Create bash file above and put it in your path. add these lines to your i3/config:
# change focus
bindsym $alt+$left exec i3-navigate-emacs left
bindsym $alt+$down exec i3-navigate-emacs down
bindsym $alt+$up exec i3-navigate-emacs up
bindsym $alt+$right exec i3-navigate-emacs right
# alternatively, you can use the cursor keys:
bindsym $alt+Left exec i3-navigate-emacs left
bindsym $alt+Down exec i3-navigate-emacs down
bindsym $alt+Up exec i3-navigate-emacs up
bindsym $alt+Right exec i3-navigate-emacs right
When you try and focus right with i3 it will first check if you have emacs focussed. If so it will try and navigate right in emacs. If that fails (which it will if you are in the rightmost pane in emacs) it will move the i3 focus to the right.
This means if you accidentally try and use i3 commands to move focus in emacs it will just work.
- jq used to parse the json and figure out the focussed window in i3
i3-msg
comes with i3, used to speak to i3emacsclient
used to speak to emacs- evil mode for emacs (I use the evil-move-right command in emacs, change it if you want I guess).
grep
(if you don't have grep on your system things probably aren't gonna work great here).
@marcoleni Hey, sorry, never noticed comments on my gists. Hope half a year isn't too late for an answer! I just had a poke around and I get the same thing, where the pane moves and then gets replaced with a
*server*
buffer.Unfortunately I don't really know the
(evil-window-move-far-right)
command so can't really say why it's happening, might be worth opening an issue withevil
and seeing if they have any ideas? Obviously the other solution is to try and dig in and see what's going on yourself. Sorry I couldn't be any help, hope you figure it out.