From cc10649a875b2e61a2e430969eaa1acaa2316ba9 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 4 May 2024 20:44:29 -0400 Subject: [PATCH] waybar: moved to new theme module and declarative config file definition --- homeManagerModules/apps/waybar/default.nix | 92 +++++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index 15fc7ebc..1d25ea36 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -11,10 +11,98 @@ home.packages = with pkgs; [ blueberry pavucontrol - (nerdfonts.override {fonts = ["Noto"];}) ]; - xdg.configFile."waybar/style.css".source = ./waybar.css; + xdg.configFile."waybar/style.css".text = '' + * { + border: none; + border-radius: 0; + font-family: "${lib.strings.removeSuffix "-Regular" config.alyraffauf.desktop.theme.terminalFont.name}"; + font-size: 14px; + font-weight: 600; + } + + window#waybar { + background: rgba (35, 38, 52, 0.0); + color: ${config.alyraffauf.desktop.theme.colors.text}; + } + + #workspaces button { + padding: 0px 5px; + margin: 0 0px; + color: ${config.alyraffauf.desktop.theme.colors.text}; + } + + #workspaces button.active, + #workspaces button.focused { + color: ${config.alyraffauf.desktop.theme.colors.primary}; + } + + #submap, + #mode { + padding: 0 15px; + margin: 0 5px; + color: #e78284; + } + + #tags button { + padding: 0px 5px; + margin: 0 0px; + color: ${config.alyraffauf.desktop.theme.colors.text}; + } + + #tags button.focused { + color: ${config.alyraffauf.desktop.theme.colors.primary}; + } + + #clock, + #battery, + #bluetooth, + #network, + #power-profiles-daemon, + #pulseaudio, + #wireplumber, + #inhibitor, + #custom-logout, + #tray { + padding: 0 7.5px; + margin: 0 5px; + } + + #battery { + color: ${config.alyraffauf.desktop.theme.colors.text}; + } + + #battery.charging { + color: ${config.alyraffauf.desktop.theme.colors.primary}; + } + + #battery.critical:not(.charging) { + color: #e78284; + } + + #workspaces, + #mode, + #submap, + #tray, + #clock, + #hardware { + border-radius: 10; + background: rgba (35, 38, 52, 0.8); + margin: 5px 10px 0px 10px; + padding: 0px 10px 0px 10px; + } + + #clock { + padding: 0px 20px 0px 20px; + } + + #submap, + #mode { + color: ${config.alyraffauf.desktop.theme.colors.text}; + background: rgba(231, 130, 132, 0.8); + } + ''; programs.waybar = { enable = true;