You are not logged in.

#1 2010-06-25 06:12:10

b3wbs
Member
Registered: 2010-06-25
Posts: 2

Ratpoison ACPI output key bind

Hi there,
I'm just looking for some help with something that is probably really easy to do.

I am running Ratpoison on my netbook and every time I want to check my battery level, I have to open a terminal and type "acpi". What I would like to do is somehow bind a key so that the output of acpi is displayed in the top-right corner of my screen, just like when I hit C-t a to see the time and date. Could someone help my with the correct thing to put in my ratpoisonrc?

Thanks in advance

Offline

#2 2010-06-25 17:06:01

Caedmon
Member
Registered: 2009-08-08
Posts: 18

Re: Ratpoison ACPI output key bind

I've keybound a small script:

#/bin/dash
ratpoison -c "echo `acpi | awk '{print $4, $3}' | tr -d ','`"

I've tried to keybind 'echo `acpi ...`' but it just displays the code unexecuted.

Edit:
Just rewrote my keybinding, getting rid of the shel-script.

bind C-a exec "ratpoison -c "echo `acpi | awk '{print $4, $3}' | tr -d ','`"

Last edited by Caedmon (2010-06-25 17:17:25)

Offline

#3 2010-06-27 11:33:09

b3wbs
Member
Registered: 2010-06-25
Posts: 2

Re: Ratpoison ACPI output key bind

Thanks mate! That works a treat. I had to remove the quotation mark before ratpoison to make it work, but it does exactly what i wanted it to!

Offline

Board footer

Powered by FluxBB