LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-01-2010, 04:43 PM   #1
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Rep: Reputation: 32
"laptop currently has X% battery life left" apps


Hiya,
Any programs out there I can get to show this on my laptop please? I've searched this forum for "laptop" and "power", but threads are going on about increasing battery life and not actually showing how much battery is left on the machine.

Many thanks in advance,

tom

ps running slack 13 on dell xps m1330, thx.
 
Old 02-01-2010, 05:55 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Which DE/WM ?

I've got KDE w/13_64 and the battery monitor shows the battery state/condition along with the AC plug condition.

You need to realize that a monitor of the type that you want will not be a true representation since the load will vary.
 
Old 02-02-2010, 04:35 AM   #3
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Original Poster
Rep: Reputation: 32
Cheers.
Damn, I knew I forgot something. I'm running fluxbox.
I realise it won't be completely accurate, I just want some warning it's getting low, rather than it just powering off
 
Old 02-02-2010, 05:14 AM   #4
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
I spent many, many months a year or two ago trying to find something that suited my needs and looked nice (to MY eyes...)

A meter or gauge (eg, in conky) wouldn't be sufficient, because if I were deep in thought whilst composing to LQ, I may not *see* that I have 0% battery, and my solution to indeed, finally, make this "The Year of The Linux Desktop!" vanishes before my eyes...(which is probably, actually, a good thing.)

None of the wm docklets, etc *looked* good to me.

I ended up writing a bash script that invoked an xosd display (a varying colour (based on capacity) "meter") that would flash and dance and spur me to save my work, or plug the thing in, or shut it down, etc.

I don't use it anymore (it was slightly fugly script-wise and eyes-wise, but worked almost flawlessly (I'd give it an 8.2 on the dependability scale)), but it's backed up somewhere.

Alas, for me, the simplest solution turned out to be running kde's guidance-power-manager, which places a nifty icon in the tray, has a highly-configurable gui which...well, you'll see - it *should* be all you'll need. The reason it took me so long to find it was that I didn't have kde installed when I was frantically searching, so it was never considered....


cheers,
 
Old 02-02-2010, 07:13 AM   #5
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Original Poster
Rep: Reputation: 32
Thanks for the reply mate. I'll have a look into it. Altho i dislike KDE and always have :/

Thanks again,
Tom
 
Old 02-02-2010, 07:28 AM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Doesn't GKrellM have a battery monitor? Speaking purely from memory, I am almost convinced it does. If you don't mind adding the app to your desktop, it could do the trick.
 
Old 02-02-2010, 07:57 AM   #7
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
I have these lines in my ~/.conkyrc
Code:
${offset 240}${color slate grey}Battery: ${color white}${battery_percent BAT0}%
${offset 240}${color slate grey}AC Adapter:
${offset 240}${color white}${exec cat /proc/acpi/ac_adapter/ADP0/state | grep state}
I have the adapter state one because my laptop is in my work van most of the time plugged into an inverter and I like to know when I lose power.
 
Old 02-02-2010, 09:18 AM   #8
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
tint2 has a builtin battery meter
 
Old 02-02-2010, 09:23 AM   #9
gapan
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 163Reputation: 163
I have libnotify + notification-daemon installed and I have configured gkrellm to run:
Code:
notify-send -u critical -i battery-caution "Low battery: 15%"
when the battery reaches 15%, and
Code:
notify-send -u critical -i battery-caution "Very low battery!"
when it reaches 8%. Both with a repeat of 60 seconds.
 
Old 02-02-2010, 09:23 AM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
conky can too
 
Old 02-02-2010, 09:23 AM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,376

Rep: Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756Reputation: 2756
I use WMab on my laptop under WindowMaker with -L 25 (for low) and -C 3 (for critical). http://www.dockapps.org/file.php/id/31

From the command line 'cat /sys/class/power_supply/BAT1/uevent'. (Make an alias for convenience).

Last edited by allend; 02-02-2010 at 09:26 AM.
 
Old 02-03-2010, 07:14 AM   #12
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Original Poster
Rep: Reputation: 32
Wooohoo! Cheers all, i shall have a play with all of these options tonight.

Thanks again,

Tom
 
Old 02-03-2010, 09:27 AM   #13
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
If you prefer XFCE, there is a battery monitor plugin for the XFCE panel:
http://goodies.xfce.org/projects/pan...battery-plugin
There used to be a slackbuild for this at slackbuilds.org. I don't see it there at this time though.
 
Old 02-03-2010, 02:09 PM   #14
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
the battery level, max charge and ac connection status are updated in text files in /sys/class/power_supply/

if you're not afraid of writing scripts, you could just use that.
 
Old 02-04-2010, 03:17 AM   #15
mutexe
Member
 
Registered: May 2009
Location: Malvern, UK
Distribution: Slackware 14.1
Posts: 240

Original Poster
Rep: Reputation: 32
Cheers Mattca, that's useful to know.

Tom
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: "Green" netbook boasts five-hour battery life LXer Syndicated Linux News 0 01-21-2009 04:00 AM
Laptop battery life PatrickMay16 General 2 07-23-2007 06:36 PM
Switching "nv" to "nvidia" = screen shifted to the left? mpriddy Linux - General 5 02-28-2007 10:38 PM
laptop battery life jb2006 Slackware 6 03-31-2006 08:54 PM
windows, good battery life -> fedora, bad battery life daedalusq1115 Linux - Laptop and Netbook 1 01-17-2005 06:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration