i3: Add vim-like mark system

Use $mod+m to 'mark' the currently highlighted window with any single
letter. (i.e. $mod+m > k will mark the window as k)
You can then refocus the window from any position and any point by
invoking $mod+' (apostrophe), mirroring vim's standard keybinds.
This commit is contained in:
Marty Oehme 2021-03-08 21:41:20 +01:00
parent a94890ea22
commit be793c90ef
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
1 changed files with 6 additions and 0 deletions

View File

@ -199,3 +199,9 @@ for_window [class="^spotify$"] move to workspace 10
for_window [class="floating"] floating enable
for_window [class="scratchpad"] floating enable
for_window [class="scratchpad"] move scratchpad
# Vim-like mark system - set with mod+m, go there with mod+'
# read 1 character and mark the current window with this character
bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
# read 1 character and go to the window with the character
bindsym $mod+apostrophe exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: '