From f293589381e07dc5dea780c7dbd8b6ab837814b3 Mon Sep 17 00:00:00 2001 From: Myned Date: Mon, 23 Dec 2024 13:00:46 -0500 Subject: [PATCH] waybar: modify config Signed-off-by: Myned --- options/custom/programs/waybar/default.nix | 32 +++++++++++++++++++--- options/custom/programs/waybar/style.css | 2 +- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/options/custom/programs/waybar/default.nix b/options/custom/programs/waybar/default.nix index 0d5947e..3006bed 100644 --- a/options/custom/programs/waybar/default.nix +++ b/options/custom/programs/waybar/default.nix @@ -60,7 +60,9 @@ in { systemd.enable = true; # Start on login # ?? waybar --log-level debug - style = '' + style = let + gap = toString config.custom.gap; + in '' * { border-radius: 50px; color: #93a1a1; @@ -70,7 +72,7 @@ in { } .horizontal > box { - margin: 0 ${toString config.custom.gap}px ${toString config.custom.gap}px; + margin: 0 ${gap}px ${gap}px; } ${readFile ./style.css} @@ -125,7 +127,7 @@ in { reload_style_on_change = true; # Reload CSS when modified ## GLOBAL ## - layer = "bottom"; + layer = "top"; position = "bottom"; ## POSITION ## @@ -134,7 +136,8 @@ in { "custom/inhibitor" "custom/vpn" "custom/vm" - "hyprland/workspaces" + (mkIf config.custom.desktops.hyprland.enable "hyprland/workspaces") + (mkIf config.custom.desktops.niri.enable "niri/workspaces") ]; modules-center = [ "clock" @@ -214,6 +217,27 @@ in { }; }; + # https://github.com/Alexays/Waybar/wiki/Module:-Niri + # https://www.nerdfonts.com/cheat-sheet + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + android = ""; + dropdown = "󰞷"; + game = "󰊴"; + hidden = ""; + music = "󰝚"; + office = "󰈙"; + password = "󰌾"; + pip = "󰹙"; + scratchpad = ""; + steam = "󰓓"; + terminal = ""; + vm = "󰢹"; + wallpaper = "󰏩"; + }; + }; + cava = cava-config; # https://github.com/Alexays/Waybar/wiki/Module:-Clock diff --git a/options/custom/programs/waybar/style.css b/options/custom/programs/waybar/style.css index c268a14..bf23a0a 100644 --- a/options/custom/programs/waybar/style.css +++ b/options/custom/programs/waybar/style.css @@ -42,7 +42,7 @@ tooltip label { .horizontal > box { background: #002b36; - border: 2px #073642 solid; + border: 2px #586e75 solid; padding: 4px; }