restructure sway keybindings

This commit is contained in:
Kabbone 2022-11-01 22:46:22 +01:00
parent 5f480ed5fa
commit b777aeec1e

View File

@ -25,6 +25,7 @@
up = "e"; up = "e";
right = "i"; right = "i";
modifier = "Mod4"; modifier = "Mod4";
floating.modifier = "Mod4";
input = { input = {
"type:keyboard" = { "type:keyboard" = {
@ -83,9 +84,9 @@
{ command = "gsettings set org.gnome.desktop.interface gtk-theme Arc"; } { command = "gsettings set org.gnome.desktop.interface gtk-theme Arc"; }
{ command = "gsettings set org.gnome.desktop.interface icon-theme ePapirus"; } { command = "gsettings set org.gnome.desktop.interface icon-theme ePapirus"; }
{ command = "gsettings set org.gnome.desktop.interface cursor-theme Adwaita"; } { command = "gsettings set org.gnome.desktop.interface cursor-theme Adwaita"; }
{ command = "${pkgs.thunderbird}/bin/thunderbird"; } #{ command = "${pkgs.thunderbird}/bin/thunderbird"; }
{ command = "${pkgs.firefox}/bin/firefox"; } #{ command = "${pkgs.firefox}/bin/firefox"; }
{ command = "${pkgs.element}/bin/element"; } #{ command = "${pkgs.element}/bin/element-desktop"; }
]; ];
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
@ -112,68 +113,106 @@
defaultWorkspace = "workspace number 2"; defaultWorkspace = "workspace number 2";
keybindings = { keybindings =
"${modifier}+Escape" = "exec swaymsg exit"; # Exit Sway let
"${modifier}+Return" = "exec ${terminal}"; # Open terminal mod = config.wayland.windowManager.sway.config.modifier;
"${modifier}+d" = "exec ${menu}"; # Open menu alt = "Mod1";
"${modifier}+e" = "exec ${pkgs.pcmanfm}/bin/pcmanfm"; # File Manager left = config.wayland.windowManager.sway.config.left;
"${modifier}+l" = "exec ${pkgs.swaylock-fancy}/bin/swaylock-fancy"; # Lock Screen down = config.wayland.windowManager.sway.config.down;
up = config.wayland.windowManager.sway.config.up;
right = config.wayland.windowManager.sway.config.right;
in
{
"${mod}+Escape" = "exec swaymsg exit"; # Exit Sway
"${mod}+Return" = "exec ${terminal}"; # Open terminal
"${mod}+d" = "exec ${menu}"; # Open menu
"${mod}+l" = "exec ${pkgs.swaylock}/bin/swaylock"; # Lock Screen
"${modifier}+r" = "reload"; # Reload environment "${mod}+r" = "reload"; # Reload environment
"${modifier}+q" = "kill"; # Kill container "${mod}+q" = "kill"; # Kill container
"${modifier}+f" = "fullscreen toggle"; # Fullscreen
"${modifier}+h" = "floating toggle"; # Floating
"${modifier}+Left" = "focus left"; # Focus container in workspace "${mod}+Shift+f" = "exec ${pkgs.pcmanfm}/bin/pcmanfm"; # File Manager
"${modifier}+Right" = "focus right";
"${modifier}+Up" = "focus up";
"${modifier}+Down" = "focus down";
"${modifier}+Shift+Left" = "move left"; # Move container in workspace
"${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Down" = "move down";
"ALT+Left" = "workspace prev_on_output"; # Navigate to previous or next workspace on output if it exists "${alt}+${left}" = "workspace prev_on_output"; # Navigate to previous or next workspace on output if it exists
"ALT+Right" = "workspace next_on_output"; "${alt}+${right}" = "workspace next_on_output";
"${alt}+Shift+${left}" = "move container to workspace prev, workspace prev"; # Move container to next available workspace and focus
"${alt}+Shift+${right}" = "move container to workspace next, workspace next";
"ALT+1" = "workspace number 1"; # Open workspace x "XF86TouchpadToggle" = "input type:touchpad events toggle enabled disabled";
"ALT+2" = "workspace number 2"; # Open workspace x "XF86AudioRaiseVolume" = "exec pulsemixer --change-volume +5 && ${config.cmds.notifications.volume}";
"ALT+3" = "workspace number 3"; # Open workspace x "XF86AudioLowerVolume" = "exec pulsemixer --change-volume -5 && ${config.cmds.notifications.volume}";
"ALT+4" = "workspace number 4"; # Open workspace x "XF86AudioMute" = "exec pulsemixer --toggle-mute && ${config.cmds.notifications.volume}";
"ALT+5" = "workspace number 5"; # Open workspace x #"XF86AudioRaiseVolume" = "exec pulsemixer --change-volume +5";
"ALT+6" = "workspace number 6"; # Open workspace x #"XF86AudioLowerVolume" = "exec pulsemixer --change-volume -5";
"ALT+7" = "workspace number 7"; # Open workspace x #"XF86AudioMute" = "exec pulsemixer --toggle-mute";
"ALT+8" = "workspace number 8"; # Open workspace x "XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5% && ${config.cmds.notifications.brightness}";
"XF86MonBrightnessUp" = "exec light -s sysfs/backlight/intel_backlight -A 5% && ${config.cmds.notifications.brightness}";
"XF86AudioPlay" = "exec playerctl play-pause";
"XF86AudioNext" = "exec playerctl next";
"XF86AudioPrev" = "exec playerctl previous";
"XF86AudioStop" = "exec playerctl stop";
"ALT+Shift+Left" = "move container to workspace prev, workspace prev"; # Move container to next available workspace and focus #XF86AudioMute = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
"ALT+Shift+Right" = "move container to workspace next, workspace next"; #XF86AudioRaiseVolume = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
#XF86AudioLowerVolume = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
#XF86AudioPlay = "exec ~/.config/waybar/scripts/toggle-play";
#XF86AudioNext = "exec playerctl --player=spotify next";
#XF86AudioPrev = "exec playerctl --player=spotify previous";
"ALT+Shift+1" = "move container to workspace number 1"; # Move container to specific workspace "${mod}+${left}" = "focus left";
"ALT+Shift+2" = "move container to workspace number 2"; "${mod}+${down}" = "focus down";
"ALT+Shift+3" = "move container to workspace number 3"; "${mod}+${up}" = "focus up";
"ALT+Shift+4" = "move container to workspace number 4"; "${mod}+${right}" = "focus right";
"ALT+Shift+5" = "move container to workspace number 5";
"ALT+Shift+6" = "move container to workspace number 6";
"ALT+Shift+7" = "move container to workspace number 7";
"ALT+Shift+8" = "move container to workspace number 8";
"Control+Up" = "resize shrink height 20px"; # Resize container "${mod}+Shift+${left}" = "move left";
"Control+Down" = "resize grow height 20px"; "${mod}+Shift+${down}" = "move down";
"Control+Left" = "resize shrink width 20px"; "${mod}+Shift+${up}" = "move up";
"Control+Right" = "resize grow width 20px"; "${mod}+Shift+${right}" = "move right";
XF86AudioMute = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; "${mod}+${alt}+${left}" = "resize grow width 10px";
XF86AudioRaiseVolume = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%"; "${mod}+${alt}+${down}" = "resize shrink height 10px";
XF86AudioLowerVolume = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%"; "${mod}+${alt}+${up}" = "resize grow height 10px";
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "${mod}+${alt}+${right}" = "resize shrink width 10px";
XF86AudioPlay = "exec ~/.config/waybar/scripts/toggle-play";
XF86AudioNext = "exec playerctl --player=spotify next"; "${mod}+1" = "workspace number 1";
XF86AudioPrev = "exec playerctl --player=spotify previous"; "${mod}+2" = "workspace number 2";
XF86MonBrightnessDown = "exec light -s sysfs/backlight/intel_backlight -U 5%"; "${mod}+3" = "workspace number 3";
XF86MonBrightnessUp = "exec light -s sysfs/backlight/intel_backlight -A 5%"; "${mod}+4" = "workspace number 4";
"${mod}+5" = "workspace number 5";
"${mod}+6" = "workspace number 6";
"${mod}+7" = "workspace number 7";
"${mod}+8" = "workspace number 8";
"${mod}+9" = "workspace number 9";
"${mod}+0" = "workspace number 10";
"${mod}+Shift+1" = "move container to workspace number 1";
"${mod}+Shift+2" = "move container to workspace number 2";
"${mod}+Shift+3" = "move container to workspace number 3";
"${mod}+Shift+4" = "move container to workspace number 4";
"${mod}+Shift+5" = "move container to workspace number 5";
"${mod}+Shift+6" = "move container to workspace number 6";
"${mod}+Shift+7" = "move container to workspace number 7";
"${mod}+Shift+8" = "move container to workspace number 8";
"${mod}+Shift+9" = "move container to workspace number 9";
"${mod}+Shift+0" = "move container to workspace number 10";
"${mod}+k" = "splith";
"${mod}+v" = "splitv";
"${mod}+b" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+p" = "layout toggle split";
"${mod}+f" = "fullscreen";
"${mod}+Shift+space" = "floating toggle";
"${mod}+m" = "focus mode_toggle";
"${mod}+a" = "focus parent";
"${mod}+Shift+minus" = "move scratchpad";
"${mod}+minus" = "scratchpad show";
}; };
}; };
systemdIntegration = true; systemdIntegration = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
@ -186,7 +225,7 @@
export LIBVA_DRIVER_NAME="iHD"; export LIBVA_DRIVER_NAME="iHD";
export VDPAU_DRIVER="iHD"; export VDPAU_DRIVER="iHD";
export XDG_SESSION_TYPE="wayland"; export XDG_SESSION_TYPE="wayland";
export XDG_CURRENT_DESKTOP="Unity"; export XDG_CURRENT_DESKTOP="sway";
#export QT_QPA_PLATFORMTHEME="wayland-egl"; #export QT_QPA_PLATFORMTHEME="wayland-egl";
export GST_VAAPI_ALL_DRIVERS="1"; export GST_VAAPI_ALL_DRIVERS="1";
export GTK_THEME="Arc"; export GTK_THEME="Arc";