From 7e05aae6c583220ef4d8e4c7ccac59b1f1c64835 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Thu, 1 Oct 2020 23:52:52 +0500 Subject: Fix tmux bindings. --- files/.tmux.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'files/.tmux.conf') diff --git a/files/.tmux.conf b/files/.tmux.conf index ed312a0..07268a8 100644 --- a/files/.tmux.conf +++ b/files/.tmux.conf @@ -42,8 +42,12 @@ bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'" bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'" # Move windows -bind P swap-window -t -1\; select-window -t -1 -bind N swap-window -t +1\; select-window -t +1 +if-shell -b '[ "$(echo "$TMUX_VERSION < 3.0" | bc)" = 1 ]' " \ + bind P swap-window -t -1; \ + bind N swap-window -t +1" +if-shell -b '[ "$(echo "$TMUX_VERSION >= 3.0" | bc)" = 1 ]' " \ + bind P { swap-window -t -1; select-window -t -1}; \ + bind N { swap-window -t +1; select-window -t +1}" #bind \ split-window -h -c '#{pane_current_path}' -- cgit v1.2.3