From 60e95c36a6d8435283e0f31f70d44fa69a377e70 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sun, 9 Nov 2025 20:08:05 +0000 Subject: [PATCH] Don't use display-popup in tmux 3.2 and lower --- tmux.conf | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tmux.conf b/tmux.conf index c072dae..9e10aed 100644 --- a/tmux.conf +++ b/tmux.conf @@ -62,14 +62,16 @@ set -ga terminal-overrides 'xterm*:smxx=\E[9m' if -b '[ "`uname`" = "Darwin" ]' \ 'set -g default-command "reattach-to-user-namespace -l $SHELL"' -# Open a popup with running the default shell -bind T display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E $SHELL -# Open a popup with session creator/switcher -bind S display-popup -B -w 60 -h 10 -E '~/.config/tmux/session.sh' -# Open a popup with project selector -bind P display-popup -B -w 60 -h 10 -E '~/.config/tmux/project.sh' -# Open a popup to pick an interpreter then launch it -bind I display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E '$SHELL -i ~/.config/tmux/interpreter.sh' +if -b '[ "$TMUX_VERSION" >= 3.2 ]' { + # Open a popup with running the default shell + bind T display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E $SHELL + # Open a popup with session creator/switcher + bind S display-popup -B -w 60 -h 10 -E '~/.config/tmux/session.sh' + # Open a popup with project selector + bind P display-popup -B -w 60 -h 10 -E '~/.config/tmux/project.sh' + # Open a popup to pick an interpreter then launch it + bind I display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E '$SHELL -i ~/.config/tmux/interpreter.sh' +} # Restore old next/previous window bindings bind C-n next-window