keyboard based resize in hyprland and waybar

This commit is contained in:
Nico
2025-04-01 21:18:15 +02:00
parent 6419427a05
commit 0b2e29fa76
3 changed files with 30 additions and 2 deletions

View File

@@ -17,11 +17,16 @@ bind = $mainMod, S, exec, rofi-screenshot,
bind = $mainMod, F, fullscreen,1 bind = $mainMod, F, fullscreen,1
bind = SUPER_SHIFT, F, fullscreen,0 bind = SUPER_SHIFT, F, fullscreen,0
# Move focus with mainMod + arrow keys # Move focus with mainMod + hjkl keys
bind = $mainMod, H, movefocus, l bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d bind = $mainMod, J, movefocus, d
# Move windows with mainMod + hjkl keys
bind = SUPER_SHIFT, H, movewindow, l
bind = SUPER_SHIFT, J, movewindow, d
bind = SUPER_SHIFT, K, movewindow, u
bind = SUPER_SHIFT, L, movewindow, r
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1 bind = $mainMod, 1, workspace, 1
@@ -55,3 +60,25 @@ bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging # Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow bindm = $mainMod, mouse:273, resizewindow
# will switch to a submap called resize
bind = $mainMod, R, submap, resize
# will start a submap called "resize"
submap = resize
# sets repeatable binds for resizing the active window
binde = , L, resizeactive, 10 0
binde = , H, resizeactive, -10 0
binde = , K, resizeactive, 0 -10
binde = , J, resizeactive, 0 10
# use reset to go back to the global submap
bind = , escape, submap, reset
# will reset the submap, which will return to the global submap
submap = reset
# keybinds further down will be global again...

View File

@@ -6,6 +6,7 @@
nil nil
ripgrep ripgrep
lldb lldb
gcc
]; ];
programs.neovim = { programs.neovim = {

View File

@@ -3,7 +3,7 @@
"position": "top", "position": "top",
"height": 35, "height": 35,
"spacing": 0, "spacing": 0,
"modules-left": ["clock", "hyprland/workspaces"], "modules-left": ["clock", "hyprland/workspaces", "hyprland/submap"],
"modules-center": [ ], "modules-center": [ ],
"modules-right": ["network", "cpu", "memory", "custom/keyboard-layout", "pulseaudio", "tray"], "modules-right": ["network", "cpu", "memory", "custom/keyboard-layout", "pulseaudio", "tray"],