Is it possible to disable the behavior which causes selecting a pane on opposite side of a tmux window if there are no more panes left in a direction select-pane command was originally triggered at?
If not, is there a way how to determine if any other panes exist in a specific direction?
If a tmux window doesn't have a (v)split active window and a select-pane command is triggered, an error message is thrown – this is expected behavior.
Thank you for response
Best Answer
Add this to your
~/.tmux.conf
:Basically, this should run with tmux versions 2.6 + (after which they added the pane_at_top, pane_at_bottom, pane_at_left, pane_at_right environment variables. For tmux < v2.6, I'm not entirely sure how you could implement this.
Further more, if you want to launch a custom-shell, do it through
set-option -g default-command fish
(or zsh or csh or whatever). As an alternative, if you want to use a non-bash shell as your tmux default shell, set it as such (set-option -g default-shell
) and then you can code out the logic above in the shell script of your choice. However, (as was in my case) using certain shells doesn't give you the convenience of one-liner if commands (or it might just be I don't know enough about certain shells, or maybe multiple lines do work in run-shell.Source: github Issues thread that I started