Tmux plugin to auto resize panes on focus similar to nvim Focus.
Utilises tmux hooks to react to the creation and selection of panes.
+
: both|
: width changes only-
: height changes onlyPlugin still in an alpha stage. Currently testing locally to confirm features and find bugs. A refactor is coming as currently not in a DRY state with a lack of naming clarity and commenting hindering contributing. Feel free to use though and open an issue or start a discussion.
Add plugin GitHub url to list of tpm plugins. Specify tag/branch for specific version.
set -g @plugin 'graemedavidson/tmux-pane-focus'
# set -g @plugin 'graemedavidson/tmux-pane-focus#tag'
Clone repo into tmux plugins dir.
Add run shell command to end of .tmux.conf
file to activate plugin.
run-shell '~/.tmux/plugins/tmux-pane-focus/focus.tmux'
Enable/Disable plugin:
set -g @pane-focus-size on
Add configuration to the .tmux.conf
file to override the following defaults:
50%
+
set -g @pane-focus-size '50'
set -g @pane-focus-direction '+'
The default and global settings can be overridden at the window level through an options menu.
tmux shortcut: ctrl-a T
.
Add current active size and direction to status bar:
set -g status-right '#[fg=colour255,bg=colour237][#{@pane-focus-direction}][#{@pane-focus-size}]#[fg=default,bg=default]'