nixos/home/waybar.nix

155 lines
5.2 KiB
Nix
Raw Normal View History

{ config, lib, ... }:
2025-12-05 11:59:27 +01:00
{
programs.waybar = {
enable = true;
systemd.enable = true;
style = ''
* {
font-size: 14px;
font-weight: 600;
}
window#waybar {
background-color: transparent;
border-radius: ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding};
}
2025-12-05 11:59:27 +01:00
#workspaces button {
all: unset;
padding: 1px 6px;
margin: 2px;
color: alpha(@base05, 0.5);
border-radius: 1em;
}
2025-12-05 11:59:27 +01:00
#workspaces button.active {
color: @base05;
}
2025-12-05 11:59:27 +01:00
#workspaces {
margin: 0px;
padding: 2px;
background-color: @base00;
border-radius: 1em;
}
#mpris,
#backlight,
#tray,
#pulseaudio,
#window,
#upower,
#clock,
#power-profiles-daemon {
padding: 2px 10px;
background-color: @base00;
color: @base05;
border-radius: ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding};
}
2025-12-05 11:59:27 +01:00
#tray {
padding: 0px 8px;
}
2025-12-05 11:59:27 +01:00
window#waybar.empty #window {
background: none;
}
#custom-sep {
color: alpha(@base05, 0.5);
}
2025-12-05 11:59:27 +01:00
'';
settings = {
mainBar = {
margin-top = config.wayland.windowManager.hyprland.settings.general.gaps_out;
margin-left = config.wayland.windowManager.hyprland.settings.general.gaps_out;
margin-right = config.wayland.windowManager.hyprland.settings.general.gaps_out;
2025-12-05 11:59:27 +01:00
layer = "top";
position = "top";
spacing = 4;
2025-12-05 11:59:27 +01:00
modules-left = [
"hyprland/workspaces"
"hyprland/window"
2025-12-05 14:01:11 +01:00
"mpris"
2025-12-05 11:59:27 +01:00
];
modules-right = [
"backlight"
"pulseaudio"
"upower"
"power-profiles-daemon"
"clock"
"tray"
];
2025-12-08 16:03:46 +01:00
"custom/sep" = {
format = " | ";
};
2025-12-05 11:59:27 +01:00
"mpris" = {
player = "spotify";
format = "{title} - {artist}";
};
"hyprland/window" = {
format = "{}";
max-length = 40;
};
"tray" = {
icon-size = 14;
spacing = 10;
2025-12-05 11:59:27 +01:00
};
"hyprland/workspaces" = {
format = "{name}";
};
"upower" = {
format = "{percentage}";
format-alt = "{time}";
icon-size = 12;
hide-if-empty = true;
tooltip = false;
tooltip-spacing = 20;
};
"power-profiles-daemon" = {
format = "{profile}";
format-tooltip = "Power profile: {profile}\nDriver: {driver}";
};
"backlight" = {
format = "{icon} {percent}%";
format-icons = [
""
""
""
""
""
""
""
""
""
];
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = "󰝟 {volume}%";
on-click = "pavucontrol";
format-icons = [
"󰕿"
"󰖀"
"󰕾"
];
};
"clock" = {
interval = 1;
format = "{:%H:%M | %d.%m.%Y}";
format-alt = "{:%H:%M | %d.%m.%Y}";
2025-12-05 11:59:27 +01:00
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
};
};
};
};
}