[]
(https://travis-ci.org/sasagon/idletimer)
Idletimer behaves like a screen saver except that it does not blank screens
and wake them up but executes preconfigured commands in ~/.idletimer
.
$ idletimer
or
$ idletimer > /dev/null &
for background.
~/.idletimer
contains one or more lines which consist of 3 items below:
- execution type (
idle
orwakeup
) - idling minute(s)
- command line text
which are separated with :
.
Idletimer passes whole text after the second :
to system()
function.
So you can use shell functions here.
Ex.1)
idle:3:~/bin/idling3min.sh
If your system does not detect any keyboard or mouse input for 3 minutes,
then idletimer executes ~/bin/idling3min.sh
Ex.2)
idle:10:date "+%F %T idle" -d "@$((`date +%s` - 60 * 10))" >> ~/idle.log
If your system has been idle for just 10 minutes, then write the time to start idling (10 minutes before) to a log file.
Ex.3)
wakeup:300:python ~/bin/timecard.py >> ~/timecard.log
If you wake up your system after idling in 300 minutes or above,
then idletimer executes ~/bin/timecard.py
with python interpreter.
-h print help message.
-v print configurations and actions verbosely.
-c config_file specify a config file instead of ~/.idletimer
- X11
- GTK+2 or 3
- libxss
see Install.md
MIT License
SASAKI Hiroshi sasagon@gmail.com