aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2020-10-01 23:52:52 +0500
committerAnton Bobov <abobov@gmail.com>2020-10-01 23:52:52 +0500
commit7e05aae6c583220ef4d8e4c7ccac59b1f1c64835 (patch)
treee9cbbb17e15f7fd1b491f37a9f93acfe1f3042da /files
parent7e2930ca2a939795f1953331749c9e0f82ec67a7 (diff)
Fix tmux bindings.
Diffstat (limited to 'files')
-rw-r--r--files/.tmux.conf8
1 files changed, 6 insertions, 2 deletions
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}'