From 478081af928e1557b325f4a4cbd5b67f079660d2 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Wed, 25 Sep 2024 19:41:02 +0530 Subject: Adding nnn file manager. Adding bspwm bindings to sxhkd only if the module is enabled. --- modules/desktop/popup-manager/rofi/default.nix | 7 +- .../desktop/popup-manager/rofi/theme.rasi.mustache | 82 ++++++++++++++++++++++ .../desktop/popup-manager/rofi/theme/default.nix | 21 ------ .../desktop/popup-manager/rofi/theme/theme.rasi | 76 -------------------- 4 files changed, 87 insertions(+), 99 deletions(-) create mode 100644 modules/desktop/popup-manager/rofi/theme.rasi.mustache delete mode 100644 modules/desktop/popup-manager/rofi/theme/default.nix delete 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 index 5c839e1..009db89 100644 --- a/modules/desktop/popup-manager/rofi/default.nix +++ b/modules/desktop/popup-manager/rofi/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: { options.desktop.popup-manager.rofi = { @@ -6,8 +6,11 @@ }; config = lib.mkIf config.desktop.popup-manager.rofi.enable { + desktop.popup-manager.application-launcher.default = "${pkgs.rofi}/bin/rofi -show run"; programs.rofi.enable = true; programs.rofi.font = "FiraCode Nerd Font 16"; - programs.rofi.theme = import ./theme config; + programs.rofi.theme = config.scheme { + template = builtins.readFile ./theme.rasi.mustache; + }; }; } diff --git a/modules/desktop/popup-manager/rofi/theme.rasi.mustache b/modules/desktop/popup-manager/rofi/theme.rasi.mustache new file mode 100644 index 0000000..02cdaf3 --- /dev/null +++ b/modules/desktop/popup-manager/rofi/theme.rasi.mustache @@ -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; +} diff --git a/modules/desktop/popup-manager/rofi/theme/default.nix b/modules/desktop/popup-manager/rofi/theme/default.nix deleted file mode 100644 index b0b8173..0000000 --- a/modules/desktop/popup-manager/rofi/theme/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 9d808b9..0000000 --- a/modules/desktop/popup-manager/rofi/theme/theme.rasi +++ /dev/null @@ -1,76 +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; - - 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