diff options
author | sefidel <contact@sefidel.net> | 2024-05-12 12:10:25 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-05-12 12:10:25 +0900 |
commit | 8351995a38e11b2ac12d34a6a3c24e4c5c6c2d60 (patch) | |
tree | de81ad2c86e879d94061b16401cbf8c0907bc470 /home/profiles/gui/config/waybar | |
parent | 0aee6013f487b00172130e374dc75bdfc0a47147 (diff) | |
download | nixrc-8351995a38e11b2ac12d34a6a3c24e4c5c6c2d60.tar.gz nixrc-8351995a38e11b2ac12d34a6a3c24e4c5c6c2d60.zip |
feat(home/gui): waybar: make systray collapsed by default
Diffstat (limited to 'home/profiles/gui/config/waybar')
-rw-r--r-- | home/profiles/gui/config/waybar/settings.nix | 19 | ||||
-rw-r--r-- | home/profiles/gui/config/waybar/style.nix | 12 |
2 files changed, 30 insertions, 1 deletions
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 = "<span foreground='#a89984'>CAFFEINE</span> {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}; |