diff --git a/sethmux-help.sh b/sethmux-help.sh index 95a57f1..8b83d4c 100755 --- a/sethmux-help.sh +++ b/sethmux-help.sh @@ -1,7 +1,10 @@ #!/bin/bash # sethmux cheat sheet — runs in the persistent help tab +# Read-only: all keyboard input is silently consumed # Redraws on terminal resize via trap +stty -echo -icanon 2>/dev/null + draw() { clear COLS=$(tput cols) @@ -75,5 +78,5 @@ draw() { trap draw WINCH draw -# Stay alive, redraw on resize -while true; do sleep 86400; done +# Read-only: consume all stdin silently, redraw on resize +while IFS= read -r -s -n 1 -t 86400 _ 2>/dev/null; do :; done diff --git a/sethmux-start.sh b/sethmux-start.sh index 20534fe..852b2bc 100755 --- a/sethmux-start.sh +++ b/sethmux-start.sh @@ -12,6 +12,7 @@ tmux new-window -t "$SESSION" -n "git" tmux new-window -t "$SESSION" -n "run" tmux new-window -t "$SESSION" -n "logs" tmux new-window -t "$SESSION" -n "help" "/opt/sethmux/sethmux-help.sh" +tmux set-option -t "$SESSION:help" -p remain-on-exit on tmux select-window -t "$SESSION:1" # Ensure logs dir exists