[openbox] a power daemon for openbox users?

Louis-David Mitterrand vindex+lists-openbox at apartia.org
Tue Jul 13 16:13:43 EDT 2010


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
> action=/etc/acpi/actions/critical-battery.sh
> 
> 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?

Thanks,


More information about the openbox mailing list