diff --git a/home-manager/modules/dynamic-colors.nix b/home-manager/modules/dynamic-colors.nix index 87c8918..9167743 100644 --- a/home-manager/modules/dynamic-colors.nix +++ b/home-manager/modules/dynamic-colors.nix @@ -13,6 +13,12 @@ let 'alacritty-light.yml', 'alacritty-dark.yml', 'alacritty.yml', + ), + ( + '~/.config/wofi', + 'color-light', + 'color-dark', + 'color', ) ] diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index fc9ccca..0ce1fe3 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -84,7 +84,7 @@ in down = "r"; terminal = "${terminalEmulator}"; - menu = "${pkgs.wofi}/bin/wofi --allow-images --show drun"; + menu = "${pkgs.wofi}/bin/wofi --allow-images --show drun --color=$HOME/.config/wofi/color"; output."*".bg = "${wallpaper} fill"; diff --git a/home-manager/modules/sway/wofi.nix b/home-manager/modules/sway/wofi.nix index 2db0add..a5ed905 100644 --- a/home-manager/modules/sway/wofi.nix +++ b/home-manager/modules/sway/wofi.nix @@ -4,61 +4,86 @@ let solarized = import ../solarized.nix; in { - xdg.configFile."wofi/style.css".text = - let - # adding it to the header doesn’t work since the defaults overwrite it - commonConfig = /* ini */ '' - background=${lib.substring 1 6 solarized.base3} - border-bottom=${lib.substring 1 6 solarized.base2} - border=${lib.substring 1 6 solarized.base2} - button-background=${lib.substring 1 6 solarized.base3} - button-text=${lib.substring 1 6 solarized.base00} - ''; - in - /* css */ '' - window { - margin: 0px; - border: 3px solid ${solarized.base02.hex}; - border-radius: 8px; - background-color: rgba(${solarized.base03.rgb},0.8); - } + xdg.configFile."wofi/color-light".text = lib.strings.concatLines (map (c: solarized."${c}".hex) [ + "base3" + "base2" + "base1" + "base0" + "base00" + "base01" + "base02" + "base03" + "red" + "orange" + "yellow" + "green" + "cyan" + "blue" + "violet" + "magenta" + ]); + xdg.configFile."wofi/color-dark".text = lib.strings.concatLines (map (c: solarized."${c}".hex) [ + "base03" + "base02" + "base01" + "base00" + "base0" + "base1" + "base2" + "base3" + "red" + "orange" + "yellow" + "green" + "cyan" + "blue" + "violet" + "magenta" + ]); + xdg.configFile."wofi/style.css".text = '' + window { + margin: 0px; + border: 3px solid --wofi-color1; + border-radius: 8px; + background-color: rgba(--wofi-rgb-color0,0.8); + } - #input { - margin: 5px; - border: none; - color: ${solarized.base0.hex}; - background-color: rgba(${solarized.base02.rgb},0.8); - } + #input { + margin: 5px; + border: none; + color: --wofi-color4; + background-color: rgba(--wofi-rgb-color1,0.8); + } - #inner-box { - margin: 5px; - border: none; - background: none; - } + #inner-box { + margin: 5px; + border: none; + background: none; + } - #outer-box { - margin: 5px; - border: none; - background: none; - } + #outer-box { + margin: 5px; + border: none; + background: none; + } - #scroll { - margin: 0px; - border: none; - } + #scroll { + margin: 0px; + border: none; + } - #text { - margin: 5px; - border: none; - color: ${solarized.base0.hex}; - } + #text { + margin: 5px; + border: none; + color: --wofi-color4; + } - #entry:selected { - background-color: rgba(${solarized.base02.rgb},0.8); - } + #entry:selected { + background-color: rgba(--wofi-rgb-color1,0.8); + } - #entry:selected #text{ - color: ${solarized.green.hex}; - } - ''; + #entry:selected #text{ + color: --wofi-color11; + } + ''; } diff --git a/pkgs/wofi-bluetooth/wofi-bluetooth.patch b/pkgs/wofi-bluetooth/wofi-bluetooth.patch index 2b18d7f..3150f7a 100644 --- a/pkgs/wofi-bluetooth/wofi-bluetooth.patch +++ b/pkgs/wofi-bluetooth/wofi-bluetooth.patch @@ -62,7 +62,7 @@ # Rofi command to pipe into, can add any options here -rofi_command="rofi -dmenu $* -p" -+wofi_command="wofi -d -i -p" ++wofi_command="wofi --color=$HOME/.config/wofi/color -d -i -p " case "$1" in --status)