o: add delays before tmux send-keys

Shell needs time to initialize before receiving commands.
This commit is contained in:
Levi Neely 2026-10-09 12:38:12 +02:00
parent 8c7a3bf83b
commit f490d4eef2
1 changed files with 2 additions and 0 deletions

View File

@ -412,9 +412,11 @@ cmd_tui() {
local ctx="$s/$a"
tmux new-session -d -s "$tmux_session" -c "$HOME"
tmux set-option -t "$tmux_session" mouse on
sleep 0.3 # Wait for shell to initialize
tmux send-keys -t "$tmux_session" "o '$ctx' log -n 1000; o '$ctx' read chat" Enter
tmux split-window -t "$tmux_session" -v -l 20%
sleep 0.2
tmux send-keys -t "$tmux_session" "o '$ctx' prompt" Enter
tmux set-option -t "$tmux_session" status-right "starting... | %H:%M"