Compare commits

..

2 Commits

Author SHA1 Message Date
effbc648f8 Use TMUX_LAYOUT_FULLSCREEN instead of heuristic
Only change `window-wide-left`/`window-wide-right` to 63%/37% split when
`TMUX_LAYOUT_FULLSCREEN=1`.
2025-11-23 10:42:36 +00:00
e500aaef7b Add binding to use window-auto layout 2025-11-23 10:42:11 +00:00
3 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@
cols=`tmux display -p "#{pane_width}"`
if [[ $cols -gt 300 ]]; then
if [ "$LAYOUT_FULLSCREEN" = "1" ]; then
tmux split-window -h -l 37% -c '#{pane_current_path}'
tmux select-pane -t 1
else

View File

@ -2,7 +2,7 @@
cols=`tmux display -p "#{pane_width}"`
if [[ $cols -gt 300 ]]; then
if [ "$TMUX_LAYOUT_FULLSCREEN" = "1" ]; then
tmux split-window -h -l 63% -c '#{pane_current_path}'
tmux select-pane -t 1
else

View File

@ -58,6 +58,10 @@ if '[ ! -n $ITERM_PROFILE ]' \
# Enable strikethrough on VTE compatible terminals.
set -ga terminal-overrides 'xterm*:smxx=\E[9m'
# Binding to create window-auto layout
bind a run-shell ~/.local/share/tmux/layouts/window-auto
# TODO: bind A run-shell ~/.local/share/tmux/layouts/window-auto --refresh
# Set only on macOS where it's required
if -b '[ "`uname`" = "Darwin" ]' \
'set -g default-command "reattach-to-user-namespace -l $SHELL"'