From c0c5087218c27e31c3e6f66f3937bff22fa0f647 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 24 Sep 2024 23:13:51 +0530 Subject: Using nix flake modules to manage the configurations. --- modules/desktop/popup-manager/rofi/default.nix | 13 ++++ .../desktop/popup-manager/rofi/theme/default.nix | 21 ++++++ .../desktop/popup-manager/rofi/theme/theme.rasi | 76 ++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 modules/desktop/popup-manager/rofi/default.nix create mode 100644 modules/desktop/popup-manager/rofi/theme/default.nix create mode 100644 modules/desktop/popup-manager/rofi/theme/theme.rasi (limited to 'modules/desktop/popup-manager/rofi') diff --git a/modules/desktop/popup-manager/rofi/default.nix b/modules/desktop/popup-manager/rofi/default.nix new file mode 100644 index 0000000..fdf7d3e --- /dev/null +++ b/modules/desktop/popup-manager/rofi/default.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: + +{ + options = { + rofi.enable = lib.mkEnableOption "Enables rofi."; + }; + + config = lib.mkIf config.rofi.enable { + programs.rofi.enable = true; + programs.rofi.font = "FiraCode Nerd Font 16"; + programs.rofi.theme = import ./theme/default.nix config; + }; +} diff --git a/modules/desktop/popup-manager/rofi/theme/default.nix b/modules/desktop/popup-manager/rofi/theme/default.nix new file mode 100644 index 0000000..b0b8173 --- /dev/null +++ b/modules/desktop/popup-manager/rofi/theme/default.nix @@ -0,0 +1,21 @@ +config: + +with config.scheme.withHashtag; +builtins.toFile "theme.rasi" +'' +${builtins.readFile ./theme.rasi} +configuration { + font: "${config.programs.rofi.font}"; +} + +* { + bg: ${base00}; + bg-alt: ${base01}; + fg: ${base07}; + fg-alt: ${base03}; +} + +window { + border-color: ${base03}; +} +'' diff --git a/modules/desktop/popup-manager/rofi/theme/theme.rasi b/modules/desktop/popup-manager/rofi/theme/theme.rasi new file mode 100644 index 0000000..9d808b9 --- /dev/null +++ b/modules/desktop/popup-manager/rofi/theme/theme.rasi @@ -0,0 +1,76 @@ +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; + + background-color: @bg; + text-color: @fg; +} + +window { + transparency: "real"; +} + +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; +} -- cgit v1.2.3