add parenting binds

This commit is contained in:
Leonardo Eugênio 2022-08-07 21:40:27 -03:00
parent 7ec137dd4c
commit 384cb9064d

View file

@ -194,6 +194,20 @@ in {
"move workspace output ${direction}"; "move workspace output ${direction}";
})); }));
parenting_binds = {
"${mod}+equal" = "focus parent";
"${mod}+minus" = "focus child";
"${mod}+r" = "layout toggle split";
"${mod}+t" = "layout toggle split tabbed stacking";
"${mod}+b" = "splith";
"${mod}+v" = "splitv";
"${mod}+a" = "focus parent";
## TODO:
# "${mod}+Shift+minus" = "move scratchpad";
# "${mod}+minus" = "scratchpad show";
};
audio_binds = { audio_binds = {
XF86AudioRaiseVolume = XF86AudioRaiseVolume =
"exec pactl set-sink-volume @DEFAULT_SINK@ +10%"; "exec pactl set-sink-volume @DEFAULT_SINK@ +10%";
@ -212,30 +226,28 @@ in {
"--locked Ctrl+${mod}+z" = "exec ${_suspend}/bin/_suspend"; "--locked Ctrl+${mod}+z" = "exec ${_suspend}/bin/_suspend";
"${mod}+Alt+c" = "exec ${_sway_idle_toggle}/bin/_sway_idle_toggle"; "${mod}+Alt+c" = "exec ${_sway_idle_toggle}/bin/_sway_idle_toggle";
}; };
in { other_binds = {
"${mod}+Return" = "exec ${terminal}"; "${mod}+s" = "exec ${menu}";
"${mod}+Ctrl+Return" = "exec thunar"; "${mod}+Return" = "exec ${terminal}";
"${mod}+x" = "kill"; "${mod}+Ctrl+Return" = "exec thunar";
"${mod}+s" = "exec ${menu}"; "${mod}+x" = "kill";
"${mod}+m" = "mode audio"; "${mod}+m" = "mode audio";
"${mod}+b" = "splith"; "${mod}+f" = "fullscreen toggle";
"${mod}+v" = "splitv"; "${mod}+Shift+space" = "floating toggle";
"${mod}+t" = "layout toggle split tabbed stacking"; "${mod}+space" = "focus mode_toggle";
"${mod}+r" = "layout toggle split"; "${mod}+Shift+c" = "reload";
"${mod}+f" = "fullscreen toggle"; # "${mod}+Shift+e" =
"${mod}+a" = "focus parent"; # "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'";
# "${mod}+s" = "layout stacking"; };
"${mod}+w" = "layout tabbed"; in mergeAttrsSet [
# "${mod}+e" = "layout toggle split"; other_binds
"${mod}+Shift+space" = "floating toggle"; workspace_binds
"${mod}+space" = "focus mode_toggle"; prev_next_binds
"${mod}+Shift+minus" = "move scratchpad"; movement_binds
"${mod}+minus" = "scratchpad show"; audio_binds
"${mod}+Shift+c" = "reload"; system_binds
# "${mod}+Shift+e" = parenting_binds
# "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'"; ];
} // workspace_binds // prev_next_binds // movement_binds // audio_binds
// system_binds;
terminal = pkgs.alacritty.executable; terminal = pkgs.alacritty.executable;
}; };
}; };