[home] Add rofi configuration for i3+sway
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.home.i3_sway;
|
cfg = config.home.i3_sway;
|
||||||
i3_cfg = config.xsession.windowManager.i3.config;
|
|
||||||
|
|
||||||
shared_config = recursiveUpdate rec {
|
shared_config = recursiveUpdate rec {
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
@@ -20,7 +19,7 @@ let
|
|||||||
keybindings = {
|
keybindings = {
|
||||||
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
||||||
"${shared_config.modifier}+Shift+q" = "kill";
|
"${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}+h" = "focus left";
|
||||||
"${shared_config.modifier}+j" = "focus down";
|
"${shared_config.modifier}+j" = "focus down";
|
||||||
@@ -115,7 +114,9 @@ in {
|
|||||||
config = {
|
config = {
|
||||||
xsession.windowManager.i3 = let
|
xsession.windowManager.i3 = let
|
||||||
base_i3_config = recursiveUpdate shared_config {
|
base_i3_config = recursiveUpdate shared_config {
|
||||||
|
menu = "rofi -show drun";
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
"${shared_config.modifier}+d" = "exec rofi -show drun";
|
||||||
"${shared_config.modifier}+Shift+e" =
|
"${shared_config.modifier}+Shift+e" =
|
||||||
"exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
|
"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
|
wayland.windowManager.sway = let
|
||||||
base_sway_config = recursiveUpdate shared_config {
|
base_sway_config = recursiveUpdate shared_config {
|
||||||
|
menu = "wofi --show drun";
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
"${shared_config.modifier}+d" = "exec wofi --show drun";
|
||||||
"${shared_config.modifier}+Shift+e" =
|
"${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'";
|
"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'";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,9 +20,10 @@ in
|
|||||||
|
|
||||||
# Desktop utilities
|
# Desktop utilities
|
||||||
feh # Image viewer and wallpaper setter for X11
|
feh # Image viewer and wallpaper setter for X11
|
||||||
|
rofi # Application launcher for X11
|
||||||
solaar # Logitech management software
|
solaar # Logitech management software
|
||||||
waybar
|
waybar
|
||||||
wofi
|
wofi # Application launcher for Wayland
|
||||||
xdg-utils # XDG utilities for opening files/URLs with default applications
|
xdg-utils # XDG utilities for opening files/URLs with default applications
|
||||||
|
|
||||||
# System utilities with GUI components
|
# System utilities with GUI components
|
||||||
@@ -76,6 +77,22 @@ in
|
|||||||
|
|
||||||
programs.spotify-player.enable = true;
|
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 = {
|
services.gnome-keyring = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user