aboutsummaryrefslogtreecommitdiff
path: root/bin/wintext
blob: ed81fa7be6376e497767f7ba1b63d27fed3a0539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/Users/ethan/plan9port/bin/rc

if(~ $winid [0-9]*) {
	9p read acme/$winid/body
	exit 0
}
if(~ $text9term 'unix!'*) {
	dial -e $text9term < /dev/null
	exit 0
}
if(~ $TMUX ?*) {
	tmux capture-pane -p
	exit 0
}

echo 'no running window found' >[2=1]
exit 1