Re: [dev] dwm battery level alarm system

From: Danilo Bargen <gezuru_AT_gmail.com>
Date: Thu, 27 Jan 2011 01:40:29 +0100

On Wed, Jan 26, 2011 at 11:51 PM, Jakub Lach <jakub_lach_AT_mailplus.pl> wrote:
> ...in my laptop noisy buzzer kicks
> in before battery is fully depleted,
> are your sure that is not the case
> with yours?

It does sometimes. It certainly did when I ran out of battery while
using Windows, and if i'm not mistaken, it already did using Arch
Linux some times in the past. The last few times it didn't. My volume
settings aren't muted. So I'd have to check what enables or disables
that feature. I'm using a T410.

The ThinkLight LED isn't a standard status-LED, it's a lamp that
illuminates your keyboard. So the following bash script is quite
useful for alarms, as I won't notice a simple message in the
notification bar.

[danilo_AT_t410 ~]$ cat /usr/local/bin/thinklight
#!/bin/bash
if [ -z $1 ]; then
    echo 'Argument missing [on|off|blink]'
    exit 1
elif [ $1 = 'blink' ]; then
    echo 'on' > /proc/acpi/ibm/light && sleep 1
    echo 'off' > /proc/acpi/ibm/light && sleep 1
elif [ $1 = 'on' ]; then
    echo 'on' > /proc/acpi/ibm/light
elif [ $1 = 'off' ]; then
    echo 'off' > /proc/acpi/ibm/light
fi

You need the correct permissions on /proc/acpi/ibm/light for this to
work. I set them in my /etc/rc.local (hope that's the right place, I
didn't test it yet).

Cheers
Danilo
Received on Thu Jan 27 2011 - 01:40:29 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 27 2011 - 01:48:02 CET