VI(M) keybindings for moving between hyprland windows #511
Replies: 5 comments 8 replies
-
|
I am a tmux/vim user, this is what I have in my |
Beta Was this translation helpful? Give feedback.
-
|
Wanted to open the same discussion. SUPER + h and SUPER + l are not used at the moment and would be a great addition to the arrow keys to stay on the home row. |
Beta Was this translation helpful? Give feedback.
-
|
It would be cool if Omarchy had "binding themes" like the default could be "DHH" theme, but then there could also be a "vim" theme and you could just swap it out. |
Beta Was this translation helpful? Give feedback.
-
|
thank you! what threw me off is that the instructions on the |
Beta Was this translation helpful? Give feedback.
-
|
For anyone stumbling upon this.
# ~/.local/bin/focus.sh
#!/bin/bash
win_info=$(hyprctl activewindow -j)
group=$(jq -r '.grouped' <<<"$win_info")
group_size=$(jq 'length' <<<"$group")
if [[ "$group_size" -eq 0 ]]; then
# Not in a group, just move focus as usual
if [[ "$1" == "left" ]]; then
hyprctl dispatch movefocus l
else
hyprctl dispatch movefocus r
fi
exit 0
fi
# In a group, find the position of the current window
address=$(jq -r '.address' <<<"$win_info")
position=$(jq -r --arg addr "$address" 'map(tostring) | index($addr)' <<<"$group")
if [[ "$1" == "left" ]]; then
if [[ "$position" -eq 0 ]]; then
hyprctl dispatch movefocus l
else
hyprctl dispatch changegroupactive b
fi
else
last_index=$((group_size - 1))
if [[ "$position" -eq "$last_index" ]]; then
hyprctl dispatch movefocus r
else
hyprctl dispatch changegroupactive f
fi
ficredit: hyprwm/Hyprland#1087 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently super k is bound to the keybindings menu, and super j is bound to toggle split. As a long time vim and tmux user I prefer to navigate splits/windows with hjkl like you would in vim. Having things bound to k and j in the main bindings isn't allowing for them to be overridden in the
~/.config/hypr/bindings.conffile. Is there a way to completely override these that I am missing, or could we consider a way to allow for hyprland window navigation with super hkjl?Beta Was this translation helpful? Give feedback.
All reactions