diff --git a/home_manager/modules/polybar.nix b/home_manager/modules/polybar.nix index 27f7d01..e9cfe67 100644 --- a/home_manager/modules/polybar.nix +++ b/home_manager/modules/polybar.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: +with lib; let inherit (pkgs.rice) colorPalette opacity; grep = "${pkgs.gnugrep}/bin/grep"; @@ -110,7 +111,7 @@ in screenchange-reload = false; }; - "bar/primary" = commonBar // { + "bar/primary" = recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = modules-right = "player pulseaudio temperature cpu memory battery date powermenu"; @@ -121,7 +122,7 @@ in }; }; - "bar/secondary" = commonBar // { + "bar/secondary" = recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = modules-right = "player pulseaudio temperature cpu memory battery date powermenu"; @@ -147,9 +148,9 @@ in }; format = { - charging = colors.selected // { text = " "; }; - discharging = colors.active // { text = " "; }; - full = colors.normal // { text = " "; }; + charging = recursiveUpdate colors.selected { text = " "; }; + discharging = recursiveUpdate colors.active { text = " "; }; + full = recursiveUpdate colors.normal { text = " "; }; }; label.text = "%percentage%%"; @@ -173,18 +174,16 @@ in }; in { - focused = colors.selected // common; - occupied = colors.active // common; - urgent = colors.active // common // { background = colors.alert; }; - empty = colors.normal // common // { text = "󰧟"; padding = 0; }; + focused = recursiveUpdate colors.selected common; + occupied = recursiveUpdate colors.active common; + urgent = recursiveUpdate (recursiveUpdate colors.active common) { background = colors.alert; }; + empty = recursiveUpdate (recursiveUpdate colors.normal common) { text = "󰧟"; padding = 0; }; }; }; "module/cpu" = { type = "internal/cpu"; - format = colors.normal // { - text = "