From bda76c6abc8484719614be7aee88b4fc3956495d Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 27 Oct 2025 19:12:15 -0700 Subject: [PATCH] [home] Add rofi configuration for i3+sway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add rofi package to desktop role with solarized theme - Configure rofi with drun, run, and window modes - Set up proper keybindings: Super+d for rofi (i3) and wofi (sway) - Fix shared config structure to avoid undefined menu reference 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- home/modules/i3+sway/default.nix | 7 +++++-- home/roles/desktop/default.nix | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/home/modules/i3+sway/default.nix b/home/modules/i3+sway/default.nix index 9b09b22..29e8391 100644 --- a/home/modules/i3+sway/default.nix +++ b/home/modules/i3+sway/default.nix @@ -4,7 +4,6 @@ with lib; let cfg = config.home.i3_sway; - i3_cfg = config.xsession.windowManager.i3.config; shared_config = recursiveUpdate rec { modifier = "Mod4"; @@ -20,7 +19,7 @@ let keybindings = { "${shared_config.modifier}+Return" = "exec ${terminal}"; "${shared_config.modifier}+Shift+q" = "kill"; - "${shared_config.modifier}+d" = "exec ${i3_cfg.menu}"; + # Menu binding will be overridden in each window manager config "${shared_config.modifier}+h" = "focus left"; "${shared_config.modifier}+j" = "focus down"; @@ -115,7 +114,9 @@ in { config = { xsession.windowManager.i3 = let base_i3_config = recursiveUpdate shared_config { + menu = "rofi -show drun"; keybindings = { + "${shared_config.modifier}+d" = "exec rofi -show drun"; "${shared_config.modifier}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'"; }; @@ -153,7 +154,9 @@ in { wayland.windowManager.sway = let base_sway_config = recursiveUpdate shared_config { + menu = "wofi --show drun"; keybindings = { + "${shared_config.modifier}+d" = "exec wofi --show drun"; "${shared_config.modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; }; diff --git a/home/roles/desktop/default.nix b/home/roles/desktop/default.nix index 7e25dcb..6b6e793 100644 --- a/home/roles/desktop/default.nix +++ b/home/roles/desktop/default.nix @@ -20,9 +20,10 @@ in # Desktop utilities feh # Image viewer and wallpaper setter for X11 + rofi # Application launcher for X11 solaar # Logitech management software waybar - wofi + wofi # Application launcher for Wayland xdg-utils # XDG utilities for opening files/URLs with default applications # System utilities with GUI components @@ -76,6 +77,22 @@ in programs.spotify-player.enable = true; + programs.rofi = { + enable = true; + theme = "solarized"; + extraConfig = { + modi = "drun,run,window"; + show-icons = true; + drun-display-format = "{name}"; + disable-history = false; + hide-scrollbar = true; + display-drun = " Apps"; + display-run = " Run"; + display-window = " Windows"; + sidebar-mode = true; + }; + }; + services.gnome-keyring = { enable = true; };