irsleeptimer

Overview

This program implements the Sleep Timer function for Lirc. While watching TV at night, you can use the remote control to program a countdown to shutdown the computer.

Usage

When you press the power button of the remote control, the state of the sleep timer will be shown. Each time you press the button before the message dissapears from the screen, the status is changed. The last status you see on the screen is the status that you has activated. To stop the sleep timer you must select 'OFF'.

The cycle of states is the following:

OFF -> NOW -> 5 -> 10 -> 15 -> 30 -> 45 -> 60 -> 90

When you select the NOW status, the program asks you to confirm. If you press again the power button, the computer will shutdown. If you don't want the computer to shutdown, you must NOT press the power button again until the question disappears from the screen.

When the timer has been programmed, the last 60 seconds of the countdown are shown on the screen. If you press the power button at this moment, the timer will be stopped and the computer will NOT shutdown.

Download

Download at Sourceforge.

Installation

This program requires the following libraries:

lirc

xosd

To compile the program you must execute:

make

And the executable will be created in the current directory.

This executable could be copied to any directory in the user or in the system execution path.

Configuration

The following entry must be added to the lirc configuration file (commonly $HOME/.lircrc):

begin
prog = irsleeptimer
remote = *
button = POWER
repeat = 0
config = <poweroff command>
end

The <poweroff command> can be replaced with a command to shutdown the computer. For example, if you use KDE you can replace with:

dcop ksmserver ksmserver logout 0 2 0

You must configure the button entry with the appropiate configuration for your remote control.

To receive the signals of Lirc you must execute the program in background as follows:

irsleeptimer &

The program has no parameters.

Related Links

Xosd - http://www.ignavus.net/software.html

Lirc - http://lirc.org

irexecosd - http://irexecosd.sourceforge.net

License

General Public Licence from The Free Software Foundation.

Author

Written by Tony García.

Change Log

0.1 (2007-02-04) First version.

Todo