Mercurial > dotfiles
comparison .zshrc @ 278:c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Apr 2012 16:50:58 -0500 |
parents | 62bfb554ab85 |
children | c7e8311eb2ba |
comparison
equal
deleted
inserted
replaced
277:884f7f932a83 | 278:c65cc71d7ba1 |
---|---|
17 fi | 17 fi |
18 fi | 18 fi |
19 export SHOWED_SCREEN_MESSAGE="true" | 19 export SHOWED_SCREEN_MESSAGE="true" |
20 fi | 20 fi |
21 | 21 |
22 if [ ! "$SHOWED_TMUX_MESSAGE" = "true" ]; then | |
23 if which tmux > /dev/null; then | |
24 detached_screens=$(tmux ls | grep -v attached) | |
25 if [ ! -z "$detached_screens" ]; then | |
26 echo "+-----------------------------------------------------------+" | |
27 echo "| Detached tmux sessions are available: |" | |
28 echo "$detached_screens" | |
29 echo "+-----------------------------------------------------------+" | |
30 fi | |
31 fi | |
32 export SHOWED_TMUX_MESSAGE="true" | |
33 fi | |
34 | |
22 # If available, source private extensions stored in a different repo | 35 # If available, source private extensions stored in a different repo |
23 if [[ -a ~/.private/zshrc ]]; then | 36 if [[ -a ~/.private/zshrc ]]; then |
24 source ~/.private/zshrc | 37 source ~/.private/zshrc |
25 fi | 38 fi |
26 | 39 |