Show screen/tmux status at start
[zsh.git] / .zsh / 95_tmuxscreen.zsh
1 # -*- mode: sh;-*-
2
3 if zstyle -T ':ganneff:config' termstatus; then
4 if is-callable tmux; then
5 foo=$(tmux list-sessions 2>/dev/null)
6 if (( ${#foo} )); then
7 preprint "tmux sessions" && echo
8 print $foo
9 preprint && echo
10 fi
11 fi
12
13 if is-callable screen; then
14 screen -q -ls
15 if [[ $? -ne 9 ]]; then
16 preprint "screen sessions" && echo
17 screen -ls
18 preprint && echo
19 fi
20 fi
21 fi | sed 's/^/ /'