[i3+sway] Some sway fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -10,16 +10,9 @@ let
|
||||
terminal = "ghostty";
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
bars = [{
|
||||
position = "bottom";
|
||||
statusCommand = "i3status";
|
||||
trayOutput = "primary"; # Enable system tray on primary output
|
||||
}];
|
||||
|
||||
keybindings = {
|
||||
"${shared_config.modifier}+Return" = "exec ${terminal}";
|
||||
"${shared_config.modifier}+Shift+q" = "kill";
|
||||
# Menu binding will be overridden in each window manager config
|
||||
|
||||
"${shared_config.modifier}+h" = "focus left";
|
||||
"${shared_config.modifier}+j" = "focus down";
|
||||
@@ -114,8 +107,12 @@ in {
|
||||
config = {
|
||||
xsession.windowManager.i3 = let
|
||||
base_i3_config = recursiveUpdate shared_config {
|
||||
menu = "rofi -show drun";
|
||||
keybindings = {
|
||||
bars = [{
|
||||
position = "bottom";
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
trayOutput = "primary"; # Enable system tray on primary output
|
||||
}];
|
||||
keybindings = shared_config.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'";
|
||||
@@ -154,8 +151,8 @@ in {
|
||||
|
||||
wayland.windowManager.sway = let
|
||||
base_sway_config = recursiveUpdate shared_config {
|
||||
menu = "wofi --show drun";
|
||||
keybindings = {
|
||||
bars = []; # Disable default bar, use waybar instead
|
||||
keybindings = shared_config.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'";
|
||||
@@ -182,5 +179,28 @@ in {
|
||||
enable = true;
|
||||
config = recursiveUpdate base_sway_config cfg.extraSwayConfig;
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.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;
|
||||
};
|
||||
};
|
||||
|
||||
programs.i3status.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -77,22 +77,6 @@ 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;
|
||||
};
|
||||
@@ -173,4 +157,4 @@ in
|
||||
|
||||
# Note: modules must be imported at top-level home config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user