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.
This commit is contained in:
14
tmux.conf
14
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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user