fix(users/multi/home): fix tmux keybindings for tmux 3.1

The "swap-window" command swaps two windows, the 'source' and
'destination' window, exchanging the indices they occupy in the window
list. In at least tmux 2.8 (which is what's in Debian Stable), if the
window under focus is the source window, then focus follows that window
(i.e. the focus changes to the current window's new index atomically
with it being moved to that index).

In more recent tmux versions, this is not the case, and the focus
remains on the old index, so that the replacement window comes under
focus. The former behaviour is still possible, but must be explicitly
requested.

Change-Id: Ieff606dfc2624b869d3bb6e1344dd4d0c6301857
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2169
Reviewed-by: multi <depot@in-addr.xyz>
Tested-by: BuildkiteCI
This commit is contained in:
multi 2020-11-27 19:11:15 +00:00
parent 1ee3a7b2bf
commit 83e586a6f2

View file

@ -71,8 +71,8 @@ in
terminal = "tmux-256color";
escapeTime = 50;
extraConfig = ''
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
bind-key -n C-S-Left swap-window -dt -1
bind-key -n C-S-Right swap-window -dt +1
'';
};