1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/bash case "$winid" in [0-9]*) 9p read acme/$winid/body exit 0 esac case "$text9term" in unix!*) dial -e $text9term </dev/null exit 0 esac case "$TMUX" in ?*) tmux capture-pane -p exit 0 esac echo 'no running window found' 2>&1 exit 1