From 08a62cf3530b4334a5494a52c7c9ed3b41aa7a72 Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Wed, 24 May 2023 11:56:03 +0200 Subject: [PATCH] Fix workspace keybinds replacing all other keybinds --- shared/home/gui/sway.nix | 41 +++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/shared/home/gui/sway.nix b/shared/home/gui/sway.nix index 346cd73..3c6cb85 100644 --- a/shared/home/gui/sway.nix +++ b/shared/home/gui/sway.nix @@ -63,30 +63,33 @@ in with lib; { size = 8.0; }; - keybindings = (genWorkspaces { inherit (cfg.workspaces) numbered named; }) // { - "${mod}+h" = "focus left"; - "${mod}+j" = "focus down"; - "${mod}+k" = "focus up"; - "${mod}+l" = "focus right"; + keybindings = mkMerge [ + (genWorkspaces { inherit (cfg.workspaces) numbered named; }) + { + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; - "${mod}+Shift+h" = "move left"; - "${mod}+Shift+j" = "move down"; - "${mod}+Shift+k" = "move up"; - "${mod}+Shift+l" = "move right"; + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; - "${mod}+a" = "split v"; - "${mod}+s" = "split h"; - "${mod}+f" = "fullscreen toggle"; + "${mod}+a" = "split v"; + "${mod}+s" = "split h"; + "${mod}+f" = "fullscreen toggle"; - "${mod}+Alt+a" = "layout toggle stacking splitv"; - "${mod}+Alt+s" = "layout toggle tabbed splith"; + "${mod}+Alt+a" = "layout toggle stacking splitv"; + "${mod}+Alt+s" = "layout toggle tabbed splith"; - "${mod}+Return" = "exec ${terminal}"; - "${mod}+Escape" = "exec ${pkgs.swaylock}/bin/swaylock"; - "${mod}+Tab" = "exec ${pkgs.firefox}/bin/firefox"; + "${mod}+Return" = "exec ${terminal}"; + "${mod}+Escape" = "exec ${pkgs.swaylock}/bin/swaylock"; + "${mod}+Tab" = "exec ${pkgs.firefox}/bin/firefox"; - "${mod}+Backspace" = "mode kill"; - }; + "${mod}+Backspace" = "mode kill"; + } + ]; modes."kill" = { Backspace = "kill; mode default";