diff options
| author | Caroline Larimore <caroline@larimo.re> | 2025-04-14 19:01:38 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2025-04-14 19:01:38 -0700 |
| commit | e8077fde966e051fc449fffcfa061c7f7edc47b0 (patch) | |
| tree | a0b1ce60f2718f90c64e924ed8df8d5d4f0d2289 /modules/home/desktop/components/rofi | |
| parent | e486d896215e7ef04438809952bc7317512d5765 (diff) | |
migration: finalize
Diffstat (limited to 'modules/home/desktop/components/rofi')
| -rw-r--r-- | modules/home/desktop/components/rofi/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/home/desktop/components/rofi/default.nix b/modules/home/desktop/components/rofi/default.nix new file mode 100644 index 0000000..a1dbe33 --- /dev/null +++ b/modules/home/desktop/components/rofi/default.nix @@ -0,0 +1,58 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.desktop.components.rofi; + desktop = config.${namespace}.desktop; +in { + options.${namespace}.desktop.components.rofi = with types; { + enable = mkEnableOption "rofi"; + }; + + config = mkIf cfg.enable { + programs.rofi = { + enable = true; + + font = "monospace 12"; + + theme = let + inherit (config.lib.formats.rasi) mkLiteral; + c = desktop.theme.colors; + in { + "@import" = "default"; + + "*" = { + background = mkLiteral "#${c.bg}"; + foreground = mkLiteral "#${c.fg}"; + foreground-alt = mkLiteral "#${c.bg3}"; + + alternate-normal-background = mkLiteral "var(background)"; + + selected-normal-foreground = mkLiteral "var(background)"; + selected-normal-background = mkLiteral "#${c.accent}"; + + border-color = mkLiteral "var(background)"; + separatorcolor = mkLiteral "#${c.bg3}"; + }; + + inputbar = { + children = map mkLiteral [ "entry" "num-filtered-rows" "textbox-num-sep" "num-rows" ]; + }; + + element = { + children = map mkLiteral [ "element-icon" "element-text" ]; + }; + + entry.placeholder = ""; + + scrollbar.handle-color = mkLiteral "var(foreground-alt)"; + num-rows.text-color = mkLiteral "var(foreground-alt)"; + num-filtered-rows.text-color = mkLiteral "var(foreground-alt)"; + textbox-num-sep.text-color = mkLiteral "var(foreground-alt)"; + + message.border = mkLiteral "1px solid 0px 0px"; + listview.border = mkLiteral "1px solid 0px 0px"; + sidebar.border = mkLiteral "1px solid 0px 0px"; + }; + }; + }; +} |