Skip to content

Commit

Permalink
Remove --clear-modifiers flag
Browse files Browse the repository at this point in the history
There is a bug in xdotool where --clear-modifiers can lead to the i3
$mod key getting stuck, see
jordansissel/xdotool#43

This means that instead of receiving e.g. <C-h>, vim will now receive
<C-M-h> (assuming i3 $mod is set to the alt key), so the keybindings in
the .vimrc need to be adapted accordingly
  • Loading branch information
Tom Praschan committed Mar 31, 2021
1 parent 3054e56 commit a679dad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ nnoremap <silent> <c-j> :call Focus('down', 'j')<CR>

```vim
" i3 integration
nnoremap <silent> <c-l> :call Focus('right', 'l')<CR>
nnoremap <silent> <c-h> :call Focus('left', 'h')<CR>
nnoremap <silent> <c-k> :call Focus('up', 'k')<CR>
nnoremap <silent> <c-j> :call Focus('down', 'j')<CR>
nnoremap <silent> <c-M-l> :call Focus('right', 'l')<CR>
nnoremap <silent> <c-M-h> :call Focus('left', 'h')<CR>
nnoremap <silent> <c-M-k> :call Focus('up', 'k')<CR>
nnoremap <silent> <c-M-j> :call Focus('down', 'j')<CR>
```

Assuming that i3 $mod is set to the alt key.

## Binary

Expand Down
Binary file modified i3-vim-nav
Binary file not shown.
2 changes: 1 addition & 1 deletion i3-vim-nav.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
}

if windowIsVim() {
keycmd := exec.Command("xdotool", "key", "--clearmodifiers", "Escape+control+"+dir)
keycmd := exec.Command("xdotool", "key", "Escape+control+"+dir)
out, _ := keycmd.Output()
if len(out) > 0 {
fmt.Println(out)
Expand Down

0 comments on commit a679dad

Please sign in to comment.