Try more layouts idk

This commit is contained in:
2025-10-16 10:18:20 +02:00
parent 61d48ca2e8
commit 6f6d7b57cf

View File

@@ -104,7 +104,14 @@ for i in "${!CMDS[@]}"; do
elif [ $pane -eq 3 ]; then
tmux split-window -v -t $SESSION:$win.1
fi
fi
# Always apply appropriate layout based on current pane count
current_panes=($(tmux list-panes -t $SESSION:$win -F '#P'))
if [ ${#current_panes[@]} -eq 2 ]; then
tmux select-layout -t $SESSION:$win even-horizontal
else
tmux select-layout -t $SESSION:$win tiled
fi
# Check if command is already running in the pane