From f0d7466cc55b0974da8ff53dc2fb3f2938b783d4 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 31 Jan 2024 08:30:40 +0000 Subject: [PATCH] Retheme rofi Use custom theme derived from catppuccin-rofi instead of stylix, use stylix for colour palette still --- home/rofi/default.nix | 100 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 1 deletion(-) diff --git a/home/rofi/default.nix b/home/rofi/default.nix index 79a0846d..1eff2bd3 100644 --- a/home/rofi/default.nix +++ b/home/rofi/default.nix @@ -3,9 +3,9 @@ pkgs, ... }: { - stylix.targets.rofi.enable = true; programs.rofi = { enable = true; + font = config.stylix.fonts.monospace.name; location = "center"; pass = { enable = true; @@ -35,5 +35,103 @@ display-combi = " 󰛡 Combi "; display-power-menu = " 󰐥 Power "; }; + theme = with config.lib.stylix.colors; let + inherit (config.lib.formats.rasi) mkLiteral; + bg = mkLiteral "rgba (${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, 50%)"; + bg2 = mkLiteral "rgba (${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 80%)"; + fg = mkLiteral withHashtag.base05; + fg2 = mkLiteral withHashtag.base04; + border = mkLiteral withHashtag.base07; + blue = mkLiteral withHashtag.blue; + in { + "*" = { + background-color = mkLiteral "transparent"; + text-color = fg; + font = with config.stylix.fonts; "${monospace.name} ${toString sizes.popups}"; + }; + + window = { + height = mkLiteral "75%"; + width = mkLiteral "75%"; + border = mkLiteral "1px"; + border-color = border; + border-radius = mkLiteral "10px"; + background-color = bg; + }; + + inputbar = { + children = map mkLiteral ["prompt" "entry"]; + padding = mkLiteral "2px"; + }; + + prompt = { + background-color = bg2; + padding = mkLiteral "6px"; + text-color = blue; + border-radius = mkLiteral "10px"; + margin = mkLiteral "20px 0px 0px 20px"; + }; + + textbox-prompt-colon = { + expand = false; + str = "="; + }; + + entry = { + padding = mkLiteral "6px"; + margin = mkLiteral "20px 0px 0px 10px"; + }; + + listview = { + border = mkLiteral "0px 0px 0px"; + padding = mkLiteral "6px 0px 0px"; + margin = mkLiteral "10px 0px 0px 20px"; + columns = 2; + lines = 5; + }; + + element = { + padding = mkLiteral "5px"; + }; + + "element-icon" = { + size = mkLiteral "25px"; + }; + + "element selected" = { + background-color = bg2; + text-color = blue; + border-radius = mkLiteral "10px"; + }; + + mode-switcher = { + spacing = 0; + }; + + button = { + padding = mkLiteral "10px"; + text-color = fg2; + border-radius = mkLiteral "10px"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.5"; + }; + + "button selected" = { + background-color = bg2; + text-color = blue; + }; + + message = { + margin = mkLiteral "2px"; + padding = mkLiteral "2px"; + border-radius = mkLiteral "5px"; + }; + + textbox = { + padding = mkLiteral "6px"; + margin = mkLiteral "20px 0px 0px 20px"; + text-color = blue; + }; + }; }; }