From bf223080a34ef243f317938fd39e785dc5576f26 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 25 Jul 2026 16:10:12 +0530 Subject: feat(rofi): add rofi launcher module, drop polybar and fzf-launcher, add private configs - Add rofi module with base16-themed .rasi template and drun mode - Remove polybar module (replaced by waybar in prior commits) - Remove fzf-launcher script (replaced by rofi) - Update hyprland window rules, keybinding, and cursor size - Add private email and git config modules - Switch pinentry from gtk2 to rofi - Tweak waybar #window margin --- modules/desktop/default.nix | 1 + modules/desktop/hyprland/default.nix | 14 +- modules/desktop/hyprland/keybindings.nix | 6 +- modules/desktop/polybar/bar/default.nix | 5 - modules/desktop/polybar/bar/main.nix | 40 ----- modules/desktop/polybar/default.nix | 28 ---- modules/desktop/polybar/module/battery.nix | 40 ----- modules/desktop/polybar/module/cpu.nix | 9 -- modules/desktop/polybar/module/date.nix | 10 -- modules/desktop/polybar/module/default.nix | 23 --- .../desktop/polybar/module/ethernet-separator.nix | 14 -- modules/desktop/polybar/module/ethernet.nix | 14 -- modules/desktop/polybar/module/i3.nix | 28 ---- modules/desktop/polybar/module/memory.nix | 9 -- modules/desktop/polybar/module/separator.nix | 7 - modules/desktop/polybar/module/time.nix | 10 -- modules/desktop/polybar/module/volume.nix | 13 -- modules/desktop/polybar/module/vpn-separator.nix | 16 -- modules/desktop/polybar/module/vpn.nix | 16 -- modules/desktop/polybar/module/wifi-separator.nix | 14 -- modules/desktop/polybar/module/wifi.nix | 21 --- modules/desktop/polybar/module/xwindow.nix | 6 - modules/desktop/rofi/default.nix | 36 +++++ modules/desktop/rofi/theme.mustache.rasi | 180 +++++++++++++++++++++ modules/desktop/waybar/style.nix | 7 +- modules/scripts/default.nix | 1 - modules/scripts/fzf-launcher/assertions.nix | 7 - modules/scripts/fzf-launcher/default.nix | 26 --- modules/scripts/fzf-launcher/script.sh | 48 ------ modules/security/gpg/default.nix | 2 +- 30 files changed, 232 insertions(+), 419 deletions(-) delete mode 100644 modules/desktop/polybar/bar/default.nix delete mode 100644 modules/desktop/polybar/bar/main.nix delete mode 100644 modules/desktop/polybar/default.nix delete mode 100644 modules/desktop/polybar/module/battery.nix delete mode 100644 modules/desktop/polybar/module/cpu.nix delete mode 100644 modules/desktop/polybar/module/date.nix delete mode 100644 modules/desktop/polybar/module/default.nix delete mode 100644 modules/desktop/polybar/module/ethernet-separator.nix delete mode 100644 modules/desktop/polybar/module/ethernet.nix delete mode 100644 modules/desktop/polybar/module/i3.nix delete mode 100644 modules/desktop/polybar/module/memory.nix delete mode 100644 modules/desktop/polybar/module/separator.nix delete mode 100644 modules/desktop/polybar/module/time.nix delete mode 100644 modules/desktop/polybar/module/volume.nix delete mode 100644 modules/desktop/polybar/module/vpn-separator.nix delete mode 100644 modules/desktop/polybar/module/vpn.nix delete mode 100644 modules/desktop/polybar/module/wifi-separator.nix delete mode 100644 modules/desktop/polybar/module/wifi.nix delete mode 100644 modules/desktop/polybar/module/xwindow.nix create mode 100644 modules/desktop/rofi/default.nix create mode 100644 modules/desktop/rofi/theme.mustache.rasi delete mode 100644 modules/scripts/fzf-launcher/assertions.nix delete mode 100644 modules/scripts/fzf-launcher/default.nix delete mode 100644 modules/scripts/fzf-launcher/script.sh (limited to 'modules') diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 759b979..27926ec 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -7,6 +7,7 @@ { imports = [ ./gtk + ./rofi ./xdg ./hyprland ./waybar diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 9f52232..97e0134 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -76,18 +76,18 @@ in } { - name = "float-application-launcher"; - match.class = "^(application-launcher)$"; + name = "float-rofi"; + match.class = "^(rofi)$"; float = true; } { - name = "size-application-launcher"; - match.class = "^(application-launcher)$"; + name = "size-rofi"; + match.class = "^(rofi)$"; size = "800 600"; } { - name = "center-application-launcher"; - match.class = "^(application-launcher)$"; + name = "center-rofi"; + match.class = "^(rofi)$"; center = true; } @@ -114,7 +114,7 @@ in enable = true; package = pkgs.rose-pine-hyprcursor; name = "rose-pine-hyprcursor"; - size = 24; + size = 20; hyprcursor.enable = true; gtk.enable = false; x11.enable = false; diff --git a/modules/desktop/hyprland/keybindings.nix b/modules/desktop/hyprland/keybindings.nix index 09ba822..d265478 100644 --- a/modules/desktop/hyprland/keybindings.nix +++ b/modules/desktop/hyprland/keybindings.nix @@ -28,10 +28,8 @@ in { config.wayland.windowManager.hyprland.settings.bind = lib.flatten [ # --- General Applications --- - (lib.optionals (config.terminal.fzf.enable && config.terminal.kitty.enable) [ - (bind "R" ( - execLua "${lib.getExe config.terminal.kitty.package} --class application-launcher -e ${lib.getExe config.scripts.fzf-launcher.package}" - )) + (lib.optionals config.desktop.rofi.enable [ + (bind "R" (execLua "${lib.getExe config.desktop.rofi.package} -show drun")) ]) (lib.optionals config.terminal.kitty.enable [ (bind "Return" (execLua "${lib.getExe config.terminal.kitty.package}")) diff --git a/modules/desktop/polybar/bar/default.nix b/modules/desktop/polybar/bar/default.nix deleted file mode 100644 index 3b13420..0000000 --- a/modules/desktop/polybar/bar/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -# Bar - Polybar bar definitions (main bar) -{ config }: -{ - "bar/main" = import ./main.nix { inherit config; }; -} diff --git a/modules/desktop/polybar/bar/main.nix b/modules/desktop/polybar/bar/main.nix deleted file mode 100644 index ed4f1fa..0000000 --- a/modules/desktop/polybar/bar/main.nix +++ /dev/null @@ -1,40 +0,0 @@ -# Main - Main polybar bar configuration (dimensions, colors, modules) -{ config }: -with config.scheme.withHashtag; -let - largerFontSize = toString (builtins.ceil (config.fonts.size * 9.0 / 8.0)); -in -{ - width = "100%:-20"; - fixed-center = false; - height = 35; - override-redirect = true; - wm-restack = "i3"; - enable-ipc = true; - - border-top-size = 1; - border-bottom-size = 1; - border-left-size = 1; - border-right-size = 1; - border-color = base03; - - background = base00; - foreground = base05; - - line-size = 3; - line-color = base08; - - padding-left = 1; - padding-right = 1; - - offset-x = "10"; - offset-y = "10"; - - font-0 = "${config.fonts.normal}:pixelsize=${toString config.fonts.size};3"; - font-1 = "${config.fonts.normal}:weight=Bold:pixelsize=${largerFontSize};3"; - font-2 = "${config.fonts.normal}:style=Light:pixelsize=${largerFontSize};2"; - - modules-left = "i3 separator"; - modules-center = "xwindow"; - modules-right = "separator volume separator battery separator vpn vpn-separator wifi wifi-separator ethernet ethernet-separator time separator memory separator cpu separator date"; -} diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix deleted file mode 100644 index 0ff7a43..0000000 --- a/modules/desktop/polybar/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -# Polybar - Status bar configuration (i3 integration, modules) -{ - config, - lib, - pkgs, - ... -}: -{ - config = lib.mkIf config.desktop.enable { - services.polybar.enable = true; - services.polybar.package = ( - pkgs.polybar.override { - pulseSupport = true; - i3Support = true; - } - ); - services.polybar.script = "${config.services.polybar.package}/bin/polybar main &"; - services.polybar.config = lib.mkMerge [ - (import ./bar { inherit config; }) - (import ./module { inherit config lib pkgs; }) - { - settings = { - screenchange-reload = true; - }; - } - ]; - }; -} diff --git a/modules/desktop/polybar/module/battery.nix b/modules/desktop/polybar/module/battery.nix deleted file mode 100644 index 6dafb67..0000000 --- a/modules/desktop/polybar/module/battery.nix +++ /dev/null @@ -1,40 +0,0 @@ -# Battery - Battery status module with icons and charging animation -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/battery"; - battery = "BAT1"; - adapter = "ADP1"; - - low-at = 0; - format-charging = "%{T2}%{F${base03}}%{F-}%{T-} "; - format-discharging = "%{T2}%{F${base03}}%{F-}%{T-} "; - format-full-prefix = "󰁹 "; - - label-charging = "%percentage:3%%"; - label-discharging = "%percentage:3%%"; - - ramp-capacity-0 = "󰁺"; - ramp-capacity-1 = "󰁻"; - ramp-capacity-2 = "󰁼"; - ramp-capacity-3 = "󰁽"; - ramp-capacity-4 = "󰁾"; - ramp-capacity-5 = "󰁿"; - ramp-capacity-6 = "󰂀"; - ramp-capacity-7 = "󰂁"; - ramp-capacity-8 = "󰂂"; - ramp-capacity-9 = "󰁹"; - - animation-charging-0 = "󰁺"; - animation-charging-1 = "󰁻"; - animation-charging-2 = "󰁼"; - animation-charging-3 = "󰁽"; - animation-charging-4 = "󰁾"; - animation-charging-5 = "󰁿"; - animation-charging-6 = "󰂀"; - animation-charging-7 = "󰂁"; - animation-charging-8 = "󰂂"; - animation-charging-9 = "󰁹"; - - animation-charging-framerate = 750; -} diff --git a/modules/desktop/polybar/module/cpu.nix b/modules/desktop/polybar/module/cpu.nix deleted file mode 100644 index 44ba984..0000000 --- a/modules/desktop/polybar/module/cpu.nix +++ /dev/null @@ -1,9 +0,0 @@ -# CPU - CPU usage percentage module -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/cpu"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; - label = "%percentage:3%%"; -} diff --git a/modules/desktop/polybar/module/date.nix b/modules/desktop/polybar/module/date.nix deleted file mode 100644 index 45e373b..0000000 --- a/modules/desktop/polybar/module/date.nix +++ /dev/null @@ -1,10 +0,0 @@ -# Date - Current date display module -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 60; - date = "%d/%m/%Y"; - label = "%date%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/desktop/polybar/module/default.nix b/modules/desktop/polybar/module/default.nix deleted file mode 100644 index 785cd6f..0000000 --- a/modules/desktop/polybar/module/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -# Module - Polybar module definitions (battery, cpu, date, i3, memory, volume, wifi, etc.) -{ - lib, - config, - pkgs, -}: -{ - "module/battery" = import ./battery.nix { inherit config; }; - "module/cpu" = import ./cpu.nix { inherit config; }; - "module/date" = import ./date.nix { inherit config; }; - "module/ethernet-separator" = import ./ethernet-separator.nix { inherit config; }; - "module/ethernet" = import ./ethernet.nix { inherit config; }; - "module/i3" = import ./i3.nix { inherit config; }; - "module/memory" = import ./memory.nix { inherit config; }; - "module/separator" = import ./separator.nix { inherit config; }; - "module/time" = import ./time.nix { inherit config; }; - "module/volume" = import ./volume.nix { inherit config; }; - "module/vpn-separator" = import ./vpn-separator.nix { inherit config lib pkgs; }; - "module/vpn" = import ./vpn.nix { inherit config lib pkgs; }; - "module/wifi-separator" = import ./wifi-separator.nix { inherit config; }; - "module/wifi" = import ./wifi.nix { inherit config; }; - "module/xwindow" = import ./xwindow.nix { }; -} diff --git a/modules/desktop/polybar/module/ethernet-separator.nix b/modules/desktop/polybar/module/ethernet-separator.nix deleted file mode 100644 index 3bdcb0e..0000000 --- a/modules/desktop/polybar/module/ethernet-separator.nix +++ /dev/null @@ -1,14 +0,0 @@ -# Ethernet-separator - Visual separator for ethernet module -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/network"; - interface = "enp4s0"; - interface-type = "wired"; - - format-connected = " %{F${base03}}%{T3}│%{T-}%{F-} "; - format-disconnected = ""; - - label-connected = ""; - label-disconnected = ""; -} diff --git a/modules/desktop/polybar/module/ethernet.nix b/modules/desktop/polybar/module/ethernet.nix deleted file mode 100644 index 4e8dfed..0000000 --- a/modules/desktop/polybar/module/ethernet.nix +++ /dev/null @@ -1,14 +0,0 @@ -# Ethernet - Wired network module (connection speed) -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/network"; - interface = "enp4s0"; - interface-type = "wired"; - - format-connected = "%{T2}%{F${base03}}%{F-}%{T-} "; - format-disconnected = ""; - - label-connected = "%netspeed:8%"; - label-disconnected = ""; -} diff --git a/modules/desktop/polybar/module/i3.nix b/modules/desktop/polybar/module/i3.nix deleted file mode 100644 index 57e83dc..0000000 --- a/modules/desktop/polybar/module/i3.nix +++ /dev/null @@ -1,28 +0,0 @@ -# i3 - i3 workspace display module (focused, occupied, urgent workspaces) -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/i3"; - - label-focused = "%index%"; - label-focused-underline = "${base0D}"; - label-focused-padding = 1; - - label-unfocused = "%index%"; - label-unfocused-padding = 1; - - label-occupied = "%index%"; - label-occupied-padding = 1; - - label-urgent = "%index%"; - label-urgent-underline = "${base08}"; - label-urgent-padding = 1; - - label-empty = "%index%"; - label-empty-foreground = "${base03}"; - label-empty-padding = 1; - - pin-workspaces = true; - index-sort = true; - show-all = true; -} diff --git a/modules/desktop/polybar/module/memory.nix b/modules/desktop/polybar/module/memory.nix deleted file mode 100644 index b401703..0000000 --- a/modules/desktop/polybar/module/memory.nix +++ /dev/null @@ -1,9 +0,0 @@ -# Memory - RAM usage module (displays GB used) -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/memory"; - interval = 2; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-} "; - label = "%gb_used:9%"; -} diff --git a/modules/desktop/polybar/module/separator.nix b/modules/desktop/polybar/module/separator.nix deleted file mode 100644 index f24b975..0000000 --- a/modules/desktop/polybar/module/separator.nix +++ /dev/null @@ -1,7 +0,0 @@ -# Separator - Visual separator between modules -{ config }: -with config.scheme.withHashtag; -{ - type = "custom/text"; - label = " %{F${base03}}%{T3}│%{T-}%{F-} "; -} diff --git a/modules/desktop/polybar/module/time.nix b/modules/desktop/polybar/module/time.nix deleted file mode 100644 index 4e6a03d..0000000 --- a/modules/desktop/polybar/module/time.nix +++ /dev/null @@ -1,10 +0,0 @@ -# Time - Current time display module (12-hour format) -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/date"; - interval = 30; - time = "%I:%M %p"; - label = "%time%"; - format-prefix = "%{T2}%{F${base03}} %{F-}%{T-}"; -} diff --git a/modules/desktop/polybar/module/volume.nix b/modules/desktop/polybar/module/volume.nix deleted file mode 100644 index 1dfbb8e..0000000 --- a/modules/desktop/polybar/module/volume.nix +++ /dev/null @@ -1,13 +0,0 @@ -# Volume - PulseAudio volume level module with icons -{ config }: -with config.scheme.withHashtag; -{ - type = "internal/pulseaudio"; - interval = 5; - format-volume = "%{T2}%{F${base03}}%{F-}%{T-} "; - label-volume = "%percentage:3%%"; - label-muted = "%{T2}%{F${base03}} %{F-}%{T-} "; - ramp-volume-0 = " "; - ramp-volume-1 = " "; - ramp-volume-2 = " "; -} diff --git a/modules/desktop/polybar/module/vpn-separator.nix b/modules/desktop/polybar/module/vpn-separator.nix deleted file mode 100644 index 2444522..0000000 --- a/modules/desktop/polybar/module/vpn-separator.nix +++ /dev/null @@ -1,16 +0,0 @@ -# VPN-separator - Visual separator for VPN module -{ - pkgs, - lib, - config, -}: -with config.scheme.withHashtag; -{ - type = "custom/script"; - exec-if = "${pkgs.runtimeShell} -c '${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0'"; - exec = "echo VPN"; - interval = 5; - - format = " %{F${base03}}%{T3}│%{T-}%{F-} "; - label = "%output%"; -} diff --git a/modules/desktop/polybar/module/vpn.nix b/modules/desktop/polybar/module/vpn.nix deleted file mode 100644 index 58bb80c..0000000 --- a/modules/desktop/polybar/module/vpn.nix +++ /dev/null @@ -1,16 +0,0 @@ -# VPN - Just indicates if VPN is connected with openvpn -{ - pkgs, - lib, - config, -}: -with config.scheme.withHashtag; -{ - type = "custom/script"; - exec-if = "${pkgs.runtimeShell} -c '${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0'"; - exec = "echo VPN"; - interval = 5; - - format = "%{T2}%{F${base03}} %{F-}%{T-}