Ajout : vm_hosted : etc/{bash.bashrc,screenrc} : indication des personnes connectées.
[lhc/ateliers.git] / etc / screenrc
index f3194ef..75bfcae 100644 (file)
@@ -30,10 +30,12 @@ termcapinfo xterm*|*rxvt* "" XT
 # NOTE: set these terminals up to be 'optimal' instead of vt100.
 termcapinfo xterm*|*rxvt*|Eterm* OP
 
-backtick 1 0 0     hostname
-backtick 2 0 84600 date '+%b'
+backtick 1 0 60    sh -c 'users=$(who -u | cut -d " " -f 1 | sort -u); test "$(printf "%s\n" $users | wc -l)" -lt 2 || { users=$(printf "%s&" $users); printf "%s@" "${users%&}"; }'
+# NOTE: show logged in users when not alone.
+backtick 2 0 0     hostname
+backtick 3 0 84600 date '+%b'
 hardstatus on
-hardstatus alwayslastline "%{= kb} %-w%{kw}%n %t%{-}%+w %=%{..m} %{= kr}%1` %{kw}%D %d %2` %0c %{= dd}"
+hardstatus alwayslastline "%{= kb} %-w%{kw}%n %t%{-}%+w %=%{..m} %{= ky}%1`%{= kr}%2` %{kw}%D %d %3` %0c %{= dd}"
 caption splitonly "%?%F%{= .bw}%:%{= .kw}%? %=%{..C}%n%{-} %t%= "
 
 sorendition wk