From 8ffe5ce23fa1548304a3fa25f2bd0e89837f5a0b Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 18 Apr 2021 16:58:23 +0200 Subject: revamp with nix flakes + desktop config --- usecases/desktop/graphical/rofi.nix | 102 ++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 usecases/desktop/graphical/rofi.nix (limited to 'usecases/desktop/graphical/rofi.nix') diff --git a/usecases/desktop/graphical/rofi.nix b/usecases/desktop/graphical/rofi.nix new file mode 100644 index 0000000..0013f5c --- /dev/null +++ b/usecases/desktop/graphical/rofi.nix @@ -0,0 +1,102 @@ +inputs: + +{ config, ... }: + +{ + home-manager.users.minijackson.programs.rofi = { + enable = true; + + # TODO: there is a better way + theme = with config.theme.colors; builtins.toFile "theme.rasi" '' + * { + dominant: ${dominant}; + + foreground: ${foreground}; + dim-foreground: ${dimForeground}; + + text-color: @foreground; + border-color: @dim-foreground; + + background-color: ${background}; + light-background: ${lightBackground}; + } + + #window { + padding: 8px; + + border: 1px solid; + background-color: @background; + } + + #mainbox { + border: 0; + padding: 0; + } + + #inputbar { + spacing: 0; + padding: 5px; + border: 0 0 1px 0; + margin: 0 0 8px 0; + children: [ prompt, textbox-prompt-sep, entry ]; + } + + #prompt { + background-color: @background; + text-color: @dim-foreground; + } + + textbox-prompt-sep { + expand: false; + str: ":"; + text-color: @dim-foreground; + margin: 0 8px 0 0; + } + + #message { + spacing: 0; + padding: 5px; + border: 0 0 1px 0; + margin: 0 0 8px 0; + } + + #listview { + spacing: 0; + } + + #element { + border: 0; + padding: 5px; + + background-color: @background; + } + + #element.selected.normal { + background-color: @dominant; + } + + #element.urgent { + background-color: ${fadedRed}; + } + + #element.selected.urgent { + background-color: ${neutralRed}; + } + + #element.active { + background-color: ${dimForeground}; + text-color: ${background}; + } + + #element.selected.active { + background-color: ${foreground}; + text-color: ${background}; + } + + #scrollbar { + width: 4px; + handle-width: 8px; + } + ''; + }; +} -- cgit v1.2.3