128 lines
3.1 KiB
Nix
Raw Normal View History

{
pkgs,
inputs,
common,
theme,
lib,
...
}:
{
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
programs.hyprpanel = {
enable = true;
# Add hyprpanel to the Hyprland config 'exec-once'.
hyprland.enable = true;
# Fix the overwrite issue with HyprPanel.
overwrite.enable = true;
# Override the final config with an arbitrary set.
# Useful for overriding colors in your selected theme.
# TODO fixes theming bugs in recent versions, should be removed when fixed
override = {
theme = {
bar.transparent = true;
font = {
name = "${theme.nerdFont} NF";
size = "15px";
};
};
};
# Configure and theme almost all options from the GUI.
# Options that require '{}' or '[]' are not yet implemented,
# except for the layout above.
# See 'https://hyprpanel.com/configuration/settings.html'.
# Default: <same as gui>
settings = {
bar = {
clock.format = "%a %b %d %H:%M";
customModules.kbLayout.leftClick = "hyprctl switchxkblayout keychron-keychron-k8-pro next";
launcher.autoDetectIcon = true;
network.label = false;
volume =
let
2025-04-13 11:42:39 +02:00
step = "1";
in
{
scrollDown = "${pkgs.hyprpanel}/bin/hyprpanel 'vol -${step}'";
scrollUp = "${pkgs.hyprpanel}/bin/hyprpanel 'vol +${step}'";
};
workspaces = {
show_icons = false;
show_numbered = true;
};
};
# Configure bar layouts for monitors.
layout = {
"bar.layouts" = {
"*" = {
left = [
"dashboard"
"workspaces"
"windowtitle"
];
middle = [ "media" ];
right = [
"kbinput"
"volume"
"network"
"systray"
"clock"
"notifications"
];
};
};
};
menus = {
clock = {
time = {
military = true;
hideSeconds = true;
};
weather = {
unit = "metric";
location = "Bergen, Norway";
key = with lib.custom; getSecret (relativeToRoot "shared/secrets/weather-api-key");
};
};
dashboard = {
directories.enabled = false;
powermenu.avatar.image = "${theme.avatar.image}";
shortcuts.left = {
shortcut1 = {
command = common.default.browser;
icon = ""; # TODO replace with Zen icon
tooltip = "Zen Browser";
};
shortcut2 = {
command = "spotify";
icon = "";
tooltip = "Spotify";
};
## shortcut3 === discord
## shortcut4 === rofi -show drun
};
stats.enable_gpu = true;
};
};
scalingPriority = "hyprland";
theme = {
bar.transparent = true;
font = {
name = "${theme.nerdFont} NF";
size = "16px";
};
};
wallpaper.enable = false;
};
};
}