diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/tools/acpi/default.nix | 13 | ||||
| -rw-r--r-- | modules/tools/default.nix | 1 | ||||
| -rw-r--r-- | modules/tools/rofi/default.nix | 64 | ||||
| -rw-r--r-- | modules/tools/rofi/theme.mustache.rasi | 82 |
4 files changed, 75 insertions, 85 deletions
diff --git a/modules/tools/acpi/default.nix b/modules/tools/acpi/default.nix new file mode 100644 index 0000000..2097620 --- /dev/null +++ b/modules/tools/acpi/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +{ + options.tools.acpi = { + enable = lib.mkEnableOption "Enables acpi."; + }; + + config = lib.mkIf config.tools.acpi.enable { + home.packages = [ + pkgs.acpi + ]; + }; +} diff --git a/modules/tools/default.nix b/modules/tools/default.nix index a76c835..d733a12 100644 --- a/modules/tools/default.nix +++ b/modules/tools/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./acpi ./bat ./brave ./brightnessctl diff --git a/modules/tools/rofi/default.nix b/modules/tools/rofi/default.nix index 9f2bcd2..7efbf5f 100644 --- a/modules/tools/rofi/default.nix +++ b/modules/tools/rofi/default.nix @@ -8,8 +8,66 @@ config = lib.mkIf config.tools.rofi.enable { 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; - # }; + programs.rofi.theme = with config.scheme.withHashtag; let + inherit (config.lib.formats.rasi) mkLiteral; + in { + "*" = { + border = 1; + margin = 0; + padding = 0; + spacing = 0; + + bg = mkLiteral base00; + bg-alt = mkLiteral base01; + fg = mkLiteral base07; + fg-alt = mkLiteral base03; + background-color = mkLiteral "@bg"; + text-color = mkLiteral "@fg"; + }; + + window = { + border-color = mkLiteral base03; + }; + + mainbox = { + children = map mkLiteral [ "inputbar" "listview" ]; + }; + + inputbar = { + background-color = mkLiteral "@bg-alt"; + children = map mkLiteral [ "prompt" "entry" ]; + }; + + entry = { + background-color = mkLiteral "inherit"; + padding = mkLiteral "12px 3px"; + }; + + prompt = { + background-color = mkLiteral "inherit"; + padding = mkLiteral "12px"; + }; + + listview = { + lines = 8; + }; + + element = { + children = map mkLiteral [ "element-text" ]; + }; + + element-icon = { + padding = mkLiteral "10px 10px"; + }; + + element-text = { + padding = mkLiteral "10px 10px"; + text-color = mkLiteral "@fg-alt"; + }; + + "element-text selected" = { + text-color = mkLiteral "@fg"; + }; + }; }; } diff --git a/modules/tools/rofi/theme.mustache.rasi b/modules/tools/rofi/theme.mustache.rasi deleted file mode 100644 index 02cdaf3..0000000 --- a/modules/tools/rofi/theme.mustache.rasi +++ /dev/null @@ -1,82 +0,0 @@ -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; -} |
