diff --git a/home/common/desktop/waybar.nix b/home/common/desktop/waybar.nix index 2e5f370..aacb0f3 100644 --- a/home/common/desktop/waybar.nix +++ b/home/common/desktop/waybar.nix @@ -1,6 +1,10 @@ -{ - config, ... -}: { +{ config, pkgs, ... }: { + # additional deps for cava support + home.packages = with pkgs; [ + iniparser + fftw + ]; + systemd.user.services.waybar = { Unit.StartLimitBurst = 30; # this fixes fonts for some reason @@ -11,28 +15,60 @@ systemd.enable = true; settings = { primary = { - height = 40; + height = 30; position = "top"; margin-top = 10; margin-left = 20; margin-right = 20; modules-left = [ "hyprland/workspaces" - "hyprland/submap" + "hyprland/language" ]; modules-center = [ "cpu" - "memory" "clock" + "memory" ]; modules-right = [ - "tray" + "mpris" "network" "pulseaudio" "battery" + "tray" ]; + + cpu = { + format = "CPU {usage}%"; + }; + + memory = { + format = "MEM {}%"; + }; + + tray = { + spacing = 10; + }; + + pulseaudio = { + format = "AUD {volume}%"; + }; + + network = { + format = "NET {ipaddr}"; + format-disconnected = "NET X"; + }; + + mpris = { + format = "{dynamic}"; + }; + + "hyprland/language" = { + format = "KBD {}"; + format-en = "EN"; + format-de = "DE"; + }; }; }; @@ -41,7 +77,7 @@ in '' * { font-family: ${config.fontProfiles.bitmap.family}, ${config.fontProfiles.monospace.family}; - font-size: 12pt; + font-size: 11pt; padding: 0; } @@ -54,11 +90,43 @@ transition: background-color .5s, color .5s; } + #workspaces button { + padding: 0 6px; + } + #workspaces button.active, #workspaces button.focused { background-color: ${withHashtag.base05}; color: ${withHashtag.base00}; } + + #cpu, + #memory { + color: ${withHashtag.base04}; + } + + #mpris { + font-size: 10pt; + margin-right: 6px; + } + + #tray { + padding: 0 5px; + background-color: ${withHashtag.base02}; + } + + #pulseaudio { + color: ${withHashtag.base0D}; + } + + #network { + color: ${withHashtag.base0C}; + } + + #language { + color: ${withHashtag.base02}; + margin-left: 10px; + } ''; }; }