with the alias, $idle is evaluated when the timer starts, and is 0 because you probably just wrote a line to start that alias. try using $!idle in the alias.