fix: make help tab read-only (stty -echo -icanon)
This commit is contained in:
+5
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user