diff --git a/modules/home-manager/desktop/sway/includes/sway.nix b/modules/home-manager/desktop/sway/includes/sway.nix index 9439f57..2592711 100644 --- a/modules/home-manager/desktop/sway/includes/sway.nix +++ b/modules/home-manager/desktop/sway/includes/sway.nix @@ -37,126 +37,126 @@ in left down up right terminal; in { - "${mod}+1" = "workspace $ws1"; - "${mod}+Shift+1" = "move container to workspace $ws1"; - "${mod}+2" = "workspace $ws2"; - "${mod}+Shift+2" = "move container to workspace $ws2"; - "${mod}+3" = "workspace $ws3"; - "${mod}+Shift+3" = "move container to workspace $ws3"; - "${mod}+4" = "workspace $ws4"; - "${mod}+Shift+4" = "move container to workspace $ws4"; - "${mod}+5" = "workspace $ws5"; - "${mod}+Shift+5" = "move container to workspace $ws5"; - "${mod}+6" = "workspace $ws6"; - "${mod}+Shift+6" = "move container to workspace $ws6"; - "${mod}+7" = "workspace $ws7"; - "${mod}+Shift+7" = "move container to workspace $ws7"; - "${mod}+8" = "workspace $ws8"; - "${mod}+Shift+8" = "move container to workspace $ws8"; - "${mod}+9" = "workspace $ws9"; - "${mod}+Shift+9" = "move container to workspace $ws9"; - "${mod}+0" = "workspace $ws0"; - "${mod}+Shift+0" = "move container to workspace $ws0"; - "${mod}+Return" = "exec ${terminal}"; - "${mod}+Shift+q" = "kill"; - "${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel"; - "${mod}+Shift+c" = "reload"; + # navigate only with direction or workspace + "${mod}+${left}" = "focus left"; + "${mod}+${down}" = "focus down"; + "${mod}+${up}" = "focus up"; + "${mod}+${right}" = " focus right"; + "${mod}+1" = "workspace $ws1"; + "${mod}+2" = "workspace $ws2"; + "${mod}+3" = "workspace $ws3"; + "${mod}+4" = "workspace $ws4"; + "${mod}+5" = "workspace $ws5"; + "${mod}+6" = "workspace $ws6"; + "${mod}+7" = "workspace $ws7"; + "${mod}+8" = "workspace $ws8"; + "${mod}+9" = "workspace $ws9"; + "${mod}+0" = "workspace $ws0"; + # move with Shift and direction + "${mod}+Shift+${left}" = "move left"; + "${mod}+Shift+${down}" = "move down"; + "${mod}+Shift+${up} move" = "move up"; + "${mod}+Shift+${right} move" = "move right"; + "${mod}+Shift+1" = "move container to workspace $ws1"; + "${mod}+Shift+2" = "move container to workspace $ws2"; + "${mod}+Shift+3" = "move container to workspace $ws3"; + "${mod}+Shift+4" = "move container to workspace $ws4"; + "${mod}+Shift+5" = "move container to workspace $ws5"; + "${mod}+Shift+6" = "move container to workspace $ws6"; + "${mod}+Shift+7" = "move container to workspace $ws7"; + "${mod}+Shift+8" = "move container to workspace $ws8"; + "${mod}+Shift+9" = "move container to workspace $ws9"; + "${mod}+Shift+0" = "move container to workspace $ws0"; + "${mod}+Ctrl+${right}" = "move workspace to output right"; + "${mod}+Ctrl+${left}" = "move workspace to output left"; + "${mod}+Return" = "exec ${terminal}"; + "${mod}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel"; + # manage windows manager actions with Alt + "${mod}+Alt+k" = "kill"; + "${mod}+Alt+c" = "reload"; + "${mod}+Alt+Backspace" = "exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'"; "${mod}+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock"; - "${mod}+${left} focus" = "left"; - "${mod}+${down} focus" = "down"; - "${mod}+${up} focus" = "up"; - "${mod}+${right} focus" = "right"; - "${mod}+Left" = "focus left"; - "${mod}+Down" = "focus down"; - "${mod}+Up" = "focus up"; - "${mod}+Right" = "focus right"; - "${mod}+Shift+${left} move" = "left"; - "${mod}+Shift+${down} move" = "down"; - "${mod}+Shift+${up} move" = "up"; - "${mod}+Shift+${right} move" = "right"; - "${mod}+Shift+Left" = "move left"; - "${mod}+Shift+Down" = "move down"; - "${mod}+Shift+Up" = "move up"; - "${mod}+Shift+Right" = "move right"; - "${mod}+b" = "splith"; - "${mod}+v" = "splitv"; - "${mod}+s" = "layout stacking"; - "${mod}+w" = "layout tabbed"; - "${mod}+e" = "layout toggle split"; - "${mod}+f" = "fullscreen"; - "${mod}+Shift+space" = "floating toggle"; - "${mod}+space" = "focus mode_toggle"; - "${mod}+a" = "focus parent"; - "${mod}+Shift+p" = "move scratchpad"; - "${mod}+p" = "scratchpad show"; + # Manage windows placement + "${mod}+b" = "splith"; + "${mod}+v" = "splitv"; + "${mod}+s" = "layout stacking"; + "${mod}+w" = "layout tabbed"; + "${mod}+e" = "layout toggle split"; + "${mod}+f" = "fullscreen"; + "${mod}+Shift+space" = "floating toggle"; + "${mod}+space" = "focus mode_toggle"; + "${mod}+a" = "focus parent"; + "${mod}+Shift+p" = "move scratchpad"; + "${mod}+p" = "scratchpad show"; + # Media stuff "${mod}+F1" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 1%-"; "${mod}+F2" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +1%"; - "${mod}+F3" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%-"; - "${mod}+F4" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%+"; - "${mod}+F5" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle"; - "${mod}+m" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SOURCE@ toggle"; + "${mod}+F3" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%-"; + "${mod}+F4" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_SINK@ 5%+"; + "${mod}+F5" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SINK@ toggle"; + "${mod}+m" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SOURCE@ toggle"; "${mod}+r" = "mode resize"; - "${mod}+n" = "exec makoctl dismiss"; - "${mod}+shift+n" = "exec makoctl dismiss -a"; - "${mod}+alt+n" = "mode notification"; + "${mod}+n" = "exec makoctl dismiss"; + "${mod}+shift+n" = "exec makoctl dismiss -a"; + "${mod}+alt+n" = "mode notification"; }; - modes = + modes = let inherit (config.wayland.windowManager.sway.config) left down up right; in { "resize" = { - "${left}" = "resize shrink width 10 px or 10 ppt"; - "${down}" = "resize grow height 10 px or 10 ppt"; - "${up}" = "resize shrink height 10 px or 10 ppt"; - "${right}" = "resize grow width 10 px or 10 ppt"; - "Return" = "mode default"; + "${left}" = "resize shrink width 10 px or 10 ppt"; + "${down}" = "resize grow height 10 px or 10 ppt"; + "${up}" = "resize shrink height 10 px or 10 ppt"; + "${right}" = "resize grow width 10 px or 10 ppt"; + "Return" = "mode default"; "Escape" = "mode default"; }; "notification" = { - "r" = "exec ${pkgs.mako}/bin/makoctl restore"; - "Escape" = "mode default"; + "r" = "exec ${pkgs.mako}/bin/makoctl restore"; + "Escape" = "mode default"; }; }; colors = { - focused = { - border = "#f268b3"; - background = "#f268b3"; - text = "#000000"; - indicator = "#1cd180"; + focused = { + border = "#f268b3"; + background = "#f268b3"; + text = "#000000"; + indicator = "#1cd180"; childBorder = "#f268b3"; }; - focusedInactive = { - border = "#323232"; - background = "#323232"; - text = "#f268b3"; - indicator = "#1cd180"; + focusedInactive = { + border = "#323232"; + background = "#323232"; + text = "#f268b3"; + indicator = "#1cd180"; childBorder = "#323232"; }; - unfocused = { - border = "#323232"; - background = "#323232"; - text = "#cccccc"; - indicator = "#1cd180"; + unfocused = { + border = "#323232"; + background = "#323232"; + text = "#cccccc"; + indicator = "#1cd180"; childBorder = "#323232"; }; urgent = { - border = "#2f343a"; - background = "#900000"; - text = "#cccccc"; - indicator = "#900000"; + border = "#2f343a"; + background = "#900000"; + text = "#cccccc"; + indicator = "#900000"; childBorder = "#900000" ; }; - #focused_tab_title = { - # boder = "#2f343a"; + #focused_tab_title = { + # boder = "#2f343a"; # background = "#2f343a"; - # text = "#ffffff"; + # text = "#ffffff"; #}; }; window = { border = 1; titlebar = false; - commands = [ + commands = [ { command = "inhibit_idle fullscreen"; criteria = {