if [ "$begin" -le "$now" -a "$now" -lt "$end" ]; then
echo "scheduled=\"Class ($event)\"" > "$HOME/.away-smart"
break
- elif [ "$old_away" = "$event" -a "$now" -gt "$max_end" ]; then
+ elif [ "$old_away" = "Class ($event)" -a "$now" -gt "$max_end" ]; then
echo "old_smart=\"$old_away\"" > "$HOME/.away-smart"
fi
done
for host in $livehosts; do
# True if a non-blanked display is found
- $ssh $host 'if DISPLAY=:0.0 xscreensaver-command -time >/dev/null 2>&1; then if DISPLAY=:0.0 xscreensaver-command -time 2>/dev/null|grep non-blanked >/dev/null; then true; else pid=`ps ax|grep "[0-9]:[0-9][0-9] ssh .*exec screen.*RR irc"|sed -e "s/^ *//"|cut -d" " -f 1`; [ -f "$HOME/.irc.lock" -o -z "$pid" ] || kill $pid; false; fi; else false; fi' && alive=$host
+ $ssh $host 'if DISPLAY=:0.0 xscreensaver-command -version >/dev/null 2>&1; then if DISPLAY=:0.0 xscreensaver-command -time 2>&1 |egrep "non-blanked|no saver status" >/dev/null; then true; else pid=`ps ax|grep "[0-9]:[0-9][0-9] ssh .*exec screen.*RR irc"|sed -e "s/^ *//"|cut -d" " -f 1`; [ -f "$HOME/.irc.lock" -o -z "$pid" ] || kill $pid; false; fi; else false; fi' && alive=$host
done
if ! ping -c 1 mona >/dev/null 2>/dev/null; then