summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2009-04-24 13:52:56 +0200
committerHugues Hiegel <hugues@hiegel.fr>2009-05-11 10:42:24 +0200
commitd2c6bee7d6f0336c21197102f161579b41a635ac (patch)
tree142427d16720321659d77b92fb5661cbaa5992b6
parentcf01b09086d7a803ee2acfb34e68fc1e4932a670 (diff)
[ZLOGIN] better screen managment
-rw-r--r--.zlogin9
1 files changed, 6 insertions, 3 deletions
diff --git a/.zlogin b/.zlogin
index 7e4c830..617576c 100644
--- a/.zlogin
+++ b/.zlogin
@@ -19,9 +19,12 @@ then
fi
#cmd_exists calendar && calendar -A0 | sed "s/\(\*.*\)/\1/;s/\(\*.*\*\)/\1/" ;\
-cmd_exists screen && [ "$(find /var/run/screen/S-$USER/ ! -type d | wc -l)" -gt 0 ] &&\
-preprint "screen" $color[bold] && echo &&\
-screen -list
+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 \
+&& rm -f .tmp.screen-list
+
#preprint "calendrier" $color[bold] ; echo
#[ -x ~/sbin//calendrier ] && ~/sbin/calendrier