umm, you do know there's an inbuilt $away, yes?

i.e.
Code:
alias checkaway {
  scon -at1 if (!$away && $idle >= 3600) { away idle for at least an hour }
}


Really, why complicate it further? :P