diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-11-20 22:36:20 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-11-20 22:36:20 +0100 |
commit | a4cce3f96ef3cc0169a3f2147866309fdaab84c9 (patch) | |
tree | c8db2ffdade77493708319d44a7ab962447ee3c8 /.zlogin | |
parent | 5d11e1cc08ea4764330b80a8e78173bbaa797150 (diff) |
[Zlogin] Manages tmux alongs screen sessions
Diffstat (limited to '.zlogin')
-rw-r--r-- | .zlogin | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -1,9 +1,20 @@ -cmd_exists screen && screen -list | strings | grep -v "^No Sockets found" > .tmp.screen-list -[ -s .tmp.screen-list ] \ -&& preprint "screen" $color[bold] && echo \ -&& < .tmp.screen-list -[ -e .tmp.screen-list ] && rm -f .tmp.screen-list +:>.tmp.screen-list +if cmd_exists tmux +then + session_manager=tmux + tmux list-sessions | strings > .tmp.screen-list +elif cmd_exists screen +then + session_manager=screen + screen -list | strings | grep -v "^No Sockets found" >> .tmp.screen-list +fi +if [ -s .tmp.screen-list ] +then + preprint "$session_manager" $color[bold] && echo + < .tmp.screen-list + rm -f .tmp.screen-list +fi cmd_exists keychain && eval $(keychain --eval --inherit any-once --quick) |