From 7085000035a918978baa316c0448e431cc6808e5 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Wed, 4 Sep 2024 22:33:02 +0200 Subject: [PATCH] bar: Add taskbar --- home/config/nil/bar.nix | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/home/config/nil/bar.nix b/home/config/nil/bar.nix index bc81d96..68a4e72 100644 --- a/home/config/nil/bar.nix +++ b/home/config/nil/bar.nix @@ -32,10 +32,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { font: 600 12pt sans-serif; } - window > box { - padding: 1.5mm 3mm; - } - window, tooltip { background: ${base00}; color: ${base05}; @@ -45,15 +41,23 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { border-color: ${base0D}; } - label.module { + #tray, #taskbar, .modules-center, .modules-right { padding: 0 3mm; - min-width: 5mm; } - #tray > * > * { + #tray image { padding: 0 1.5mm; } + #taskbar button { + padding: 0 1.5mm; + } + + .modules-right label.module { + padding: 1.5mm 3mm; + min-width: 5mm; + } + #battery.warning { color: ${yellow}; } @@ -89,8 +93,13 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { position = "bottom"; spacing = 0; - modules-left = [ "tray" ]; + modules-left = [ + "tray" + "wlr/taskbar" + ]; + modules-center = [ "mpris" ]; + modules-right = [ "idle_inhibitor" "network" @@ -110,6 +119,15 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { tray.spacing = 0; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 16; + tooltip-format = "{title}"; + + on-click = "activate"; + on-click-right = "close"; + }; + mpris = { interval = 1; format = "{status_icon} {dynamic} {player_icon}";