From 1cada48ab4755e1c3a6bf445ac9f1dbdf419167b Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 23 Sep 2023 12:59:22 +0530 Subject: readd rofi --- programs/rofi.nix | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 programs/rofi.nix (limited to 'programs') diff --git a/programs/rofi.nix b/programs/rofi.nix new file mode 100644 index 0000000..12c0d7b --- /dev/null +++ b/programs/rofi.nix @@ -0,0 +1,72 @@ +{ config +, pkgs +, theme +, ... +}: + +with theme; +let + inherit (config.lib.formats.rasi) mkLiteral; + rofi-theme = { + "@import" = "default"; + "*" = { + active-background = mkLiteral theme.base00; + alternate-active-background = mkLiteral theme.base00; + alternate-normal-background = mkLiteral theme.base00; + background = mkLiteral theme.base00; + background-color = mkLiteral theme.base00; + normal-background = mkLiteral theme.base00; + selected-active-background = mkLiteral theme.base00; + selected-normal-background = mkLiteral theme.base00; + selected-urgent-background = mkLiteral theme.base00; + + active-foreground = mkLiteral theme.base05; + alternate-active-foreground = mkLiteral theme.base05; + alternate-normal-foreground = mkLiteral theme.base05; + foreground = mkLiteral theme.base05; + normal-foreground = mkLiteral theme.base05; + selected-active-foreground = mkLiteral theme.base0C; + selected-normal-foreground = mkLiteral theme.base0C; + urgent-foreground = mkLiteral theme.base05; + + border = mkLiteral "4px solid"; + border-color = mkLiteral theme.base01; + }; + + inputbar.children = [ "entry" ]; + + element.padding = 10; + entry = { + padding = 10; + placeholder = "type to filter"; + }; + listview.border = 0; + scrollbar.handle-width = 0; + window = { + padding = 40; + width = 800; + height = 600; + }; + }; +in +{ + programs.rofi = { + enable = true; + font = "Fira Code 21"; + location = "top-left"; + xoffset = 20; + yoffset = 20; + cycle = true; + theme = rofi-theme; + extraConfig = { + modes = mkLiteral "[ combi ]"; + combi-modes = mkLiteral "[ window, run ]"; + # window = mkLiteral ''{ display-name: "[w]"; }''; + # run = mkLiteral ''{ display-name: "[r]"; }''; + kb-clear-line = "Control+c"; + kb-remove-word-back = "Control+w"; + }; + }; +} + + -- cgit v1.2.3