[openbox] a power daemon for openbox users?
pedrib at gmail.com
Tue Jul 13 18:37:12 EDT 2010
On 13 July 2010 21:13, Louis-David Mitterrand
<vindex+lists-openbox at apartia.org> wrote:
> On Tue, Jul 13, 2010 at 08:49:36PM +0100, Pedro Ribeiro wrote:
>> On 13 July 2010 16:57, Louis-David Mitterrand
>> <vindex+lists-openbox at apartia.org> wrote:
>> > Hi,
>> > What do openbox users use as power-daemon on their laptop? Some utility
>> > that would halt or suspend when battery power becomes critically low,
>> > but without any gnome dependency. Does such a thing exist?
>> > Thanks,
>> > --
>> > http://www.cruisefish.net
>> > _______________________________________________
>> > openbox mailing list
>> > openbox at icculus.org
>> > http://icculus.org/mailman/listinfo/openbox
>> It exists, and certainly its already installed in your laptop. Its
>> called acpid. Its a daemon that responds to ACPI events.
>> In Debian/Ubuntu, there are two directories where you can put scripts
>> to control it.
>> /etc/acpi/events - the events that trigger an action
>> /etc/acpi/actions - actions taken (regular bash scripts)
>> The format of the events is pretty simple, here's one:
>> event=battery/* PNP0C0A:00 00000080 00000001
>> This basically means that when the event with that code occurs, the
>> script in action is run.
>> To find out event codes, run the acpi_listen program. Wait for a
>> critical or low battery warning (possibly watching the battery low led
>> on your laptop) and note down the corresponding code on event=. Then
>> just run a script that hibernates, shuts down, whatever on action=
>> (remember to set the executable bit on the script).
>> It may be more trouble that its worth it. It took me a few weeks to
>> get all my pm functions right, but now I'm completely free of any
>> gnome-power-manager, pm-utils and all that crap which gave me trouble
>> for such a long time.
> This is exaclty what I'm looking for. Would you care to share your
> custom /etc/acpi/events and /etc/acpi/actions?
> openbox mailing list
> openbox at icculus.org
There you go. Some comments are written in Portuguese... and the
powersave.sh script probably won't make any sense for your computer.
Keep in mind the event codes might be different for your computer (I
have no idea if they are specific or ACPI-generic).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3253 bytes
Desc: not available
More information about the openbox