mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:43:56 -05:00
hyprland: rework window management keybinds
This commit is contained in:
parent
b8a7477b5b
commit
efcee2b996
|
@ -150,6 +150,17 @@
|
||||||
region = "${bin} -m region -o ${folder}";
|
region = "${bin} -m region -o ${folder}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
windowManagerBinds = {
|
||||||
|
down = "d";
|
||||||
|
left = "l";
|
||||||
|
right = "r";
|
||||||
|
up = "u";
|
||||||
|
h = "l";
|
||||||
|
j = "d";
|
||||||
|
k = "u";
|
||||||
|
l = "r";
|
||||||
|
};
|
||||||
|
|
||||||
defaultWorkspaces = [1 2 3 4 5 6 7 8 9];
|
defaultWorkspaces = [1 2 3 4 5 6 7 8 9];
|
||||||
|
|
||||||
laptopMonitors = {
|
laptopMonitors = {
|
||||||
|
@ -360,8 +371,7 @@
|
||||||
|
|
||||||
# Window Rules
|
# Window Rules
|
||||||
${
|
${
|
||||||
lib.strings.concatMapStringsSep
|
lib.strings.concatMapStringsSep "\n"
|
||||||
"\n"
|
|
||||||
(x: ''
|
(x: ''
|
||||||
windowrulev2 = center(1),class:(${x})
|
windowrulev2 = center(1),class:(${x})
|
||||||
windowrulev2 = float,class:(${x})
|
windowrulev2 = float,class:(${x})
|
||||||
|
@ -401,19 +411,22 @@
|
||||||
bind = ${modifier} SHIFT, W, fullscreen
|
bind = ${modifier} SHIFT, W, fullscreen
|
||||||
bind = ${modifier} SHIFT, V, togglefloating,
|
bind = ${modifier} SHIFT, V, togglefloating,
|
||||||
# bind = ${modifier} SHIFT, P, pseudo, # dwindle
|
# bind = ${modifier} SHIFT, P, pseudo, # dwindle
|
||||||
bind = ${modifier} SHIFT, J, togglesplit, # dwindle
|
bind = ${modifier} SHIFT, backslash, togglesplit, # dwindle
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Move focus with mainMod + keys ++
|
||||||
bind = ${modifier}, left, movefocus, l
|
# Move window with mainMod SHIFT + keys ++
|
||||||
bind = ${modifier}, right, movefocus, r
|
# Move workspace to another output with mainMod CONTROL SHIFT + keys.
|
||||||
bind = ${modifier}, up, movefocus, u
|
${
|
||||||
bind = ${modifier}, down, movefocus, d
|
lib.strings.concatStringsSep "\n"
|
||||||
|
(
|
||||||
# Move window with mainMod SHIFT + arrow keys
|
lib.attrsets.mapAttrsToList (key: direction: ''
|
||||||
bind = ${modifier} SHIFT, left, movewindow, l
|
bind = ${modifier}, ${key}, movefocus, ${direction}
|
||||||
bind = ${modifier} SHIFT, right, movewindow, r
|
bind = ${modifier} SHIFT, ${key}, movewindow, ${direction}
|
||||||
bind = ${modifier} SHIFT, up, movewindow, u
|
bind = ${modifier} CONTROL SHIFT, ${key}, movecurrentworkspacetomonitor, ${direction}
|
||||||
bind = ${modifier} SHIFT, down, movewindow, d
|
'')
|
||||||
|
windowManagerBinds
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
# Gnome-like workspaces.
|
# Gnome-like workspaces.
|
||||||
bind = ${modifier}, comma, exec, ${hyprnome} --previous
|
bind = ${modifier}, comma, exec, ${hyprnome} --previous
|
||||||
|
@ -421,28 +434,17 @@
|
||||||
bind = ${modifier} SHIFT, comma, exec, ${hyprnome} --previous --move
|
bind = ${modifier} SHIFT, comma, exec, ${hyprnome} --previous --move
|
||||||
bind = ${modifier} SHIFT, period, exec, ${hyprnome} --move
|
bind = ${modifier} SHIFT, period, exec, ${hyprnome} --move
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [1-9]
|
# Switch workspaces with mainMod + [1-9] ++
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [1-9].
|
||||||
${
|
${
|
||||||
lib.strings.concatMapStringsSep
|
lib.strings.concatMapStringsSep "\n"
|
||||||
"\n"
|
(x: ''
|
||||||
(x: "bind = ${modifier}, ${toString x}, workspace, ${toString x}")
|
bind = ${modifier}, ${toString x}, workspace, ${toString x}
|
||||||
|
bind = ${modifier} SHIFT, ${toString x}, movetoworkspace, ${toString x}
|
||||||
|
'')
|
||||||
defaultWorkspaces
|
defaultWorkspaces
|
||||||
}
|
}
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [1-9]
|
|
||||||
${
|
|
||||||
lib.strings.concatMapStringsSep
|
|
||||||
"\n"
|
|
||||||
(x: "bind = ${modifier} SHIFT, ${toString x}, movetoworkspace, ${toString x}")
|
|
||||||
defaultWorkspaces
|
|
||||||
}
|
|
||||||
|
|
||||||
# Move workspace to another output.
|
|
||||||
bind = ${modifier} CONTROL SHIFT, Left, movecurrentworkspacetomonitor, l
|
|
||||||
bind = ${modifier} CONTROL SHIFT, Down, movecurrentworkspacetomonitor, d
|
|
||||||
bind = ${modifier} CONTROL SHIFT, Up, movecurrentworkspacetomonitor, u
|
|
||||||
bind = ${modifier} CONTROL SHIFT, Right, movecurrentworkspacetomonitor, r
|
|
||||||
|
|
||||||
# Scratchpad show and move
|
# Scratchpad show and move
|
||||||
bind = ${modifier}, S, togglespecialworkspace, magic
|
bind = ${modifier}, S, togglespecialworkspace, magic
|
||||||
bind = ${modifier} SHIFT, S, movetoworkspace, special:magic
|
bind = ${modifier} SHIFT, S, movetoworkspace, special:magic
|
||||||
|
@ -479,27 +481,35 @@
|
||||||
|
|
||||||
bind=CTRL ALT,R,submap,resize
|
bind=CTRL ALT,R,submap,resize
|
||||||
submap=resize
|
submap=resize
|
||||||
binde=,right,resizeactive,10 0
|
|
||||||
binde=,left,resizeactive,-10 0
|
|
||||||
binde=,up,resizeactive,0 -10
|
|
||||||
binde=,down,resizeactive,0 10
|
binde=,down,resizeactive,0 10
|
||||||
|
binde=,left,resizeactive,-10 0
|
||||||
|
binde=,right,resizeactive,10 0
|
||||||
|
binde=,up,resizeactive,0 -10
|
||||||
bind=,escape,submap,reset
|
bind=,escape,submap,reset
|
||||||
submap=reset
|
submap=reset
|
||||||
|
|
||||||
bind=CTRL ALT,M,submap,move
|
bind=CTRL ALT,M,submap,move
|
||||||
submap=move
|
submap=move
|
||||||
# Move window with arrow keys
|
# Move window with keys ++
|
||||||
bind = , left, movewindow, l
|
# Move workspaces across monitors with CONTROL + keys.
|
||||||
bind = , right, movewindow, r
|
${
|
||||||
bind = , up, movewindow, u
|
lib.strings.concatStringsSep "\n"
|
||||||
bind = , down, movewindow, d
|
(
|
||||||
|
lib.attrsets.mapAttrsToList (key: direction: ''
|
||||||
|
bind = , ${key}, movewindow, ${direction}
|
||||||
|
bind = CONTROL, ${key}, movecurrentworkspacetomonitor, ${direction}
|
||||||
|
'')
|
||||||
|
windowManagerBinds
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
# Move active window to a workspace with [1-9]
|
# Move active window to a workspace with [1-9]
|
||||||
${
|
${
|
||||||
lib.strings.concatMapStringsSep
|
lib.strings.concatMapStringsSep "\n"
|
||||||
"\n"
|
|
||||||
(x: "bind = , ${toString x}, movetoworkspace, ${toString x}")
|
(x: "bind = , ${toString x}, movetoworkspace, ${toString x}")
|
||||||
defaultWorkspaces
|
defaultWorkspaces
|
||||||
}
|
}
|
||||||
|
|
||||||
# hyprnome
|
# hyprnome
|
||||||
bind = , comma, exec, ${hyprnome} --previous --move
|
bind = , comma, exec, ${hyprnome} --previous --move
|
||||||
bind = , period, exec, ${hyprnome} --move
|
bind = , period, exec, ${hyprnome} --move
|
||||||
|
|
Loading…
Reference in a new issue