about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authormulti <depot@in-addr.xyz>2020-11-27T19·11+0000
committermulti <depot@in-addr.xyz>2020-11-27T19·23+0000
commit83e586a6f21ca3042be1bb71c20e7823902ce333 (patch)
tree4001ec1d7bca876eda7edae48571405f82c82655 /users
parent1ee3a7b2bf030e0eec11fbf43c2acc8dd462ac22 (diff)
fix(users/multi/home): fix tmux keybindings for tmux 3.1 r/1936
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
Diffstat (limited to 'users')
-rw-r--r--users/multi/home/configs/whitby.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/multi/home/configs/whitby.nix b/users/multi/home/configs/whitby.nix
index 9d455a177185..3f6882a55bba 100644
--- a/users/multi/home/configs/whitby.nix
+++ b/users/multi/home/configs/whitby.nix
@@ -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
       '';
     };