From 8351995a38e11b2ac12d34a6a3c24e4c5c6c2d60 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 12 May 2024 12:10:25 +0900 Subject: feat(home/gui): waybar: make systray collapsed by default --- home/profiles/gui/config/waybar/settings.nix | 19 ++++++++++++++++++- home/profiles/gui/config/waybar/style.nix | 12 ++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'home/profiles/gui/config/waybar') diff --git a/home/profiles/gui/config/waybar/settings.nix b/home/profiles/gui/config/waybar/settings.nix index 8cb2b5e..1529378 100644 --- a/home/profiles/gui/config/waybar/settings.nix +++ b/home/profiles/gui/config/waybar/settings.nix @@ -11,7 +11,7 @@ in height = 22; modules-left = [ "wireplumber" "custom/separator" "cpu" "custom/separator" "memory" "custom/separator" "idle_inhibitor" ]; modules-center = [ "sway/workspaces" ]; - modules-right = [ "tray" "network" "custom/separator" ] + modules-right = [ "group/tray" "custom/separator" "network" "custom/separator" ] ++ lib.optionals (guiCfg.laptop.enable) [ "battery" "custom/separator" ] ++ [ "clock" ]; @@ -74,10 +74,27 @@ in format = "CAFFEINE {status}"; }; + "group/tray" = { + orientation = "inherit"; + drawer = { + transition-duration = 500; + }; + modules = [ + "custom/tray-placeholder" + "tray" + ]; + }; + "tray" = { spacing = 5; }; + "custom/tray-placeholder" = { + format = "Tray >"; + interval = "once"; + tooltip = false; + }; + "custom/separator" = { format = "|"; interval = "once"; diff --git a/home/profiles/gui/config/waybar/style.nix b/home/profiles/gui/config/waybar/style.nix index 25047ae..92eb772 100644 --- a/home/profiles/gui/config/waybar/style.nix +++ b/home/profiles/gui/config/waybar/style.nix @@ -73,6 +73,13 @@ in border-bottom: 1px solid #${bright0}; } + #tray { + /* TODO: https://github.com/Alexays/Waybar/issues/2906 */ + margin: 0; + padding: 0; + padding-left: 0.1rem; + } + @keyframes blink { to { background-color: #f0a0c0; @@ -80,6 +87,11 @@ in } } + #custom-tray-placeholder { + color: #${color6}; + padding-right: 0.2rem; + } + #custom-separator { color: #${alt1}; background-color: #${background}; -- cgit 1.4.1