--- /dev/null
+#!/bin/sh
+# $Id$
+# -*- sh -*- vim: ft=sh sw=4 sts=4
+
+# Performs routine actions based on my away status. Designed to be
+# periodically called by cron on homer.
+
+away="`tpope away`"
+activity="`tpope activity`"
+ping -c 1 marge >/dev/null 2>&1 && eval `ssh marge cat .away-smart`
+
+case "$away" in
+ Sleeping|"Away from keyboard"|"Adult Swim"|"") is_away=0 ;;
+ *[Cc]lass*) is_away=1 ;;
+esac
+
+[ "$old_phone" = absent ] && is_away=1
+
+if [ "$is_away" = 1 ]; then
+ [ ! -f /tmp/.tpope_lights ] && touch /tmp/.tpope_lights && br -F -F
+else
+ rm -f /tmp/.tpope_lights; br -n 5
+fi
+
+if [ "$activity" ]; then
+ information="$activity"
+elif [ "$away" ]; then
+ information="$away"
+elif [ "$old_alive" = "lisa" ]; then
+ information="On laptop"
+else
+ information=
+fi
+
+if [ -z "$information" ]; then
+ echo > "$HOME/.caminfo"
+ echo Here > "$HOME/.status"
+ rm -f "$HOME/.plan"
+else
+ echo " - $information" > "$HOME/.caminfo"
+ echo "$information" > "$HOME/.status"
+ echo "$information" > "$HOME/.plan"
+fi
+
+ping -c 1 bart >/dev/null && scp -q "$HOME/.status" bart: 2>/dev/null