# HG changeset patch # User Augie Fackler # Date 1335563458 18000 # Node ID c65cc71d7ba139c68d3cddbd2e8158085b9f55bc # Parent 884f7f932a836a9ee4ad4d38b782ec6d93966709 zshrc: add a tmux variant of the detached screens message diff --git a/.zshrc b/.zshrc --- a/.zshrc +++ b/.zshrc @@ -19,6 +19,19 @@ if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" export SHOWED_SCREEN_MESSAGE="true" fi +if [ ! "$SHOWED_TMUX_MESSAGE" = "true" ]; then + if which tmux > /dev/null; then + detached_screens=$(tmux ls | grep -v attached) + if [ ! -z "$detached_screens" ]; then + echo "+-----------------------------------------------------------+" + echo "| Detached tmux sessions are available: |" + echo "$detached_screens" + echo "+-----------------------------------------------------------+" + fi + fi + export SHOWED_TMUX_MESSAGE="true" +fi + # If available, source private extensions stored in a different repo if [[ -a ~/.private/zshrc ]]; then source ~/.private/zshrc