nixos/home/waybar.nix
2025-12-05 14:01:11 +01:00

153 lines
4.1 KiB
Nix

{ config, ... }:
{
programs.waybar = {
enable = true;
systemd.enable = true;
style = ''
* {
font-family: "0xProto Nerd Font Propo";
font-size: 14px;
font-weight: 600;
}
window#waybar {
background-color: transparent;
}
#workspaces button {
all: unset;
padding: 1px 6px;
margin: 2px;
color: alpha(@base05, 0.5);
border-radius: 1em;
}
#workspaces button.active {
color: @base00;
background-color: @base05;
}
#workspaces {
margin: 0px;
padding: 2px;
background-color: @base00;
border-radius: 1em;
}
#mpris,
#backlight,
#tray,
#pulseaudio,
#window,
#upower,
#clock,
#power-profiles-daemon {
margin: 0px;
padding: 2px 14px;
border-radius: 1em;
background-color: @base00;
color: @base05;
}
#tray {
padding: 0px 6px 0px 6px;
}
window#waybar.empty #window {
background: none;
}
'';
settings = {
mainBar = {
layer = "top";
position = "top";
margin-top = 5;
margin-right = 5;
margin-left = 5;
spacing = 5;
modules-left = [
"hyprland/workspaces"
"hyprland/window"
"mpris"
];
modules-right = [
"backlight"
"pulseaudio"
"upower"
"power-profiles-daemon"
"clock"
"tray"
];
"mpris" = {
player = "spotify";
format = "{title} - {artist}";
};
"hyprland/window" = {
format = "{}";
max-length = 40;
};
"tray" = {
spacing = 10;
icon-size = 16;
};
"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:%S | %d.%m.%Y}";
format-alt = "{:%H:%M:%S | %d.%m.%Y}";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
};
};
};
};
}