From f39699058513bedd711d0bb6b8b3fcf37bbc36be Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH] waybar: finally square centered modules Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 2298e79..19d3530 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -15,7 +15,7 @@ in { }; settings.bottom = { position = "bottom"; - height = 33; + height = 34; spacing = 0; margin-left = 36 + 3; margin-right = 36 + 3; @@ -25,17 +25,17 @@ in { "wlr/taskbar" ]; modules-right = [ - "clock" "niri/workspaces" + "clock" "niri/language" ]; "niri/workspaces" = { format = "{index}"; }; "niri/language" = { - format = "{}"; - format-en = "πŸ‡ΊπŸ‡Έ"; - format-uk = "πŸ‡ΊπŸ‡¦"; + format = "{short}"; + # format-en = "πŸ‡ΊπŸ‡Έ"; + # format-uk = "πŸ‡ΊπŸ‡¦"; }; clock = { format = "{:%R}"; @@ -58,7 +58,7 @@ in { }; settings.top = { position = "top"; - height = 33; + height = 34; spacing = 0; margin-left = 36 + 3; margin-right = 36 + 3; @@ -73,6 +73,7 @@ in { "cpu" "memory" "wireplumber" + "wireplumber#source" (ifLaptop "group/laptop") "idle_inhibitor" ]; @@ -148,12 +149,19 @@ in { }; }; wireplumber = { - scroll-step = 3; format = "{volume}% {icon}"; format-muted = "󰖁"; format-icons = ["σ°•Ώ" "σ°–€" "σ°•Ύ"]; on-click = lib.getExe pkgs.pwvucontrol; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + scroll-step = 3; + }; + "wireplumber#source" = { + node-type = "Audio/Source"; + format = "{volume}% 󰍬"; + format-muted = "󰍭"; + on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + scroll-step = 3; }; "custom/notification" = { tooltip = false; @@ -323,7 +331,7 @@ in { #taskbar button, #workspaces button { border-radius: 6px; - min-width: 1.4em; + min-width: 1.35em; padding: 0; } @@ -339,13 +347,9 @@ in { margin-right: 0; } - #taskbar button { - padding-left: 0; - } - #taskbar button { padding: 0 0.4em; - margin: 3px; + margin: 3px 3px 3px 0; } #taskbar button.active, @@ -374,6 +378,7 @@ in { -gtk-icon-effect: dim; } + #taskbar, #workspaces { padding-left: 3px; }