Move into an external dir
[zsh.git] / .zsh / 90_Exec.zsh
1 # -*- mode: sh;-*-
2
3 if is-callable fortune && zstyle -T ':ganneff:config' fortune; then
4 preprint "Fortune" && echo
5 fortune | fmt -s -w 74
6 preprint && echo
7 echo
8 fi | sed 's/^/ /'
9
10 if zstyle -T ':ganneff:config' termstatus; then
11 if is-callable tmux; then
12 foo=$(tmux list-sessions 2>/dev/null)
13 if (( ${#foo} )); then
14 preprint "tmux sessions" && echo
15 print $foo
16 preprint && echo
17 fi
18 fi
19
20 if is-callable screen; then
21 screen -q -ls
22 # According to the manpage the exit level with -q can be one
23 # of 9==no sessions, 10==not attachable sessions,
24 # 11 (or more)==sessions.
25 # But of course there are bugs, and so 8 is also returned in
26 # certain conditions when there are no sessions.
27 # So lets work on "exit level higher than 9"...
28 if [[ $? -gt 9 ]]; then
29 preprint "screen sessions" && echo
30 screen -ls
31 preprint && echo
32 fi
33 fi
34 fi | sed 's/^/ /'