From 2bdc15debdb35a08a5e2c508e1f3d18724fc44c0 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Tue, 27 Jan 2026 11:01:59 +0000 Subject: [PATCH] Add display-popup fallback bindings While display-popup was added in 3.2 the -B, -b, and -S flags were not introduced until 3.3. This adds fallback bindings which forego these flags to retain functionality at the cost of aesthetics. --- tmux.conf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tmux.conf b/tmux.conf index 11c7fac..f60c41e 100644 --- a/tmux.conf +++ b/tmux.conf @@ -66,14 +66,16 @@ bind a run-shell ~/.local/share/tmux/layouts/window-auto if -b '[ "`uname`" = "Darwin" ]' \ 'set -g default-command "reattach-to-user-namespace -l $SHELL"' -if -b '~/.config/tmux/check-version.sh ">" 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 +if -b '~/.config/tmux/check-version.sh ">=" 3.2 && ~/.config/tmux/check-version.sh "<" 3.3' { + bind T display-popup -d '#{pane_current_path}' -E $SHELL + bind S display-popup -w 60 -h 10 -E '~/.config/tmux/session.sh' + bind P display-popup -w 60 -h 10 -E '~/.config/tmux/project.sh' + bind I display-popup -d '#{pane_current_path}' -E '$SHELL -i ~/.config/tmux/interpreter.sh' +} +if -b '~/.config/tmux/check-version.sh ">=" 3.3' { + bind T display-popup -S fg=#54546D -d '#{pane_current_path}' -E $SHELL 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' }