diff options
Diffstat (limited to 'modules/desktop/application-launcher/rofi')
| -rw-r--r-- | modules/desktop/application-launcher/rofi/default.nix | 20 | ||||
| -rw-r--r-- | modules/desktop/application-launcher/rofi/theme.mustache.rasi | 82 |
2 files changed, 102 insertions, 0 deletions
diff --git a/modules/desktop/application-launcher/rofi/default.nix b/modules/desktop/application-launcher/rofi/default.nix new file mode 100644 index 0000000..58a64a4 --- /dev/null +++ b/modules/desktop/application-launcher/rofi/default.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + options.desktop.application-launcher.rofi = { + enable = lib.mkEnableOption "Enables rofi."; + }; + + config = lib.mkIf config.desktop.application-launcher.rofi.enable { + desktop.application-launcher.default = lib.mkDefault "rofi"; + desktop.application-launcher.command = + if config.desktop.application-launcher.default == "rofi" then + lib.mkForce "${pkgs.rofi}/bin/rofi -show run" + else ""; + programs.rofi.enable = true; + programs.rofi.font = "${config.fonts.normal} ${toString config.fonts.size}"; + programs.rofi.theme = config.scheme { + template = builtins.readFile ./theme.mustache.rasi; + }; + }; +} diff --git a/modules/desktop/application-launcher/rofi/theme.mustache.rasi b/modules/desktop/application-launcher/rofi/theme.mustache.rasi new file mode 100644 index 0000000..02cdaf3 --- /dev/null +++ b/modules/desktop/application-launcher/rofi/theme.mustache.rasi @@ -0,0 +1,82 @@ +configuration { + drun { + display-name: " "; + } + + run { + display-name: " "; + } + + window { + display-name: " "; + } + + ssh { + display-name: " "; + } + + timeout { + delay: 10; + action: "kb-cancel"; + } +} + +* { + border: 1; + margin: 0; + padding: 0; + spacing: 0; + + bg: #{{base00-hex}}; + bg-alt: #{{base01-hex}}; + fg: #{{base07-hex}}; + fg-alt: #{{base03-hex}}; + + background-color: @bg; + text-color: @fg; +} + +window { + transparency: "real"; + border-color: #{{base03-hex}}; +} + +mainbox { + children: [inputbar, listview]; +} + +inputbar { + background-color: @bg-alt; + children: [prompt, entry]; +} + +entry { + background-color: inherit; + padding: 12px 3px; +} + +prompt { + background-color: inherit; + padding: 12px; +} + +listview { + lines: 8; +} + +element { + children: [element-text]; +} + +element-icon { + padding: 10px 10px; +} + +element-text { + padding: 10px 10px; + text-color: @fg-alt; +} + +element-text selected { + text-color: @fg; +} |
