Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 24 Nov 2014, 08:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Vattery+IBAM
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [34 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Mon 18 Jan 2010, 23:51    Post subject:  

Yeah fixing that is on my todo list. Perhaps a third color for 'fully charged'.
Back to top
View user's profile Send private message Visit poster's website 
OverDrive

Joined: 02 Jan 2006
Posts: 165
Location: Cleveland, OHIO,USA

PostPosted: Tue 19 Jan 2010, 00:30    Post subject:  

jemimah, That would do it. Then if the user doesn't see that color then they know something is up. Between that and the dialog box popup's, IMHO, we should be good to go. FWIW, I'm using this on my tray instead of asapm just because of the popup's alone.

Best Regards

OverDrive

_________________
Instant Puppy Fan!!!
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Tue 19 Jan 2010, 01:22    Post subject:  

I've posted a new version that uses the charging color for fully charged batteries instead of the discharging color.
Back to top
View user's profile Send private message Visit poster's website 
OverDrive

Joined: 02 Jan 2006
Posts: 165
Location: Cleveland, OHIO,USA

PostPosted: Tue 19 Jan 2010, 23:47    Post subject:    

Jemimah, That's perfect. Thank you so much. FWIW, I also tested the dialog box's and they also worked quite nicely on my notebook. Hey, If your ever coming to Cleveland, let me know. I'll take you out for some good local chow..


All the Best

OverDrive

_________________
Instant Puppy Fan!!!
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Wed 20 Jan 2010, 13:56    Post subject:  

Using this on a heavily re-mastered 4.3.1. Very very nice thanks. I have been hoping for a replacement for asapm for sometime as it is so darn ugly. Thanks a million.............
_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Wed 20 Jan 2010, 15:48    Post subject:  

I've added a pet for Trayclock. It's an analog clock for the systray by the same developer as Vattery, and it matches nicely.
Back to top
View user's profile Send private message Visit poster's website 
makerprofaze

Joined: 03 Jan 2010
Posts: 20

PostPosted: Fri 22 Jan 2010, 19:53    Post subject:  

!
Last edited by makerprofaze on Sat 23 Jan 2010, 01:28; edited 1 time in total
Back to top
View user's profile Send private message 
makerprofaze

Joined: 03 Jan 2010
Posts: 20

PostPosted: Fri 22 Jan 2010, 19:55    Post subject:  

I'm using this on 4.31 retro. I had a mystery shutoff the other day and had to reinstall Puppy, very bad thing. It actually left my laptop in a questionable condition (!). First thing I did upon gettitng everything working was start looking for a battery gauge. Vattery has already warned me twice since then, adverting catastrophe - not that I'm sloppy or anything.

Thanks heaps for this. It should be built into the OS. I'm glad I'm new enough to Puppy, cause I would have been pissed without it!
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Fri 22 Jan 2010, 23:25    Post subject:  

Glad to help.

I'm working on a cpu temperature monitor based on Vattery code... maybe a whole suite of tray monitors is in the works. The source code is on my website if anyone wants to play with it.
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Tue 26 Jan 2010, 23:25    Post subject:  

I've uploaded a new version of Vattery and also a new applet TrayTemp for monitoring your CPU temperature.
Back to top
View user's profile Send private message Visit poster's website 
ljfr

Joined: 23 Apr 2009
Posts: 176

PostPosted: Wed 07 Apr 2010, 04:13    Post subject: source  

Hi jemimah,
where can we find the sources of your latest versions ?
regards,
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Wed 07 Apr 2010, 07:46    Post subject:  

There's two mirrors now for sources, http://drop.io/jemimah, and http://puppeee.com/files/sources/. If you have trouble getting them to build, let me know - Valac doesn't really like Puppy's version of gtk.
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4378

PostPosted: Wed 28 Apr 2010, 19:50    Post subject:  

stupid script that I wrote:
Code:
#!/bin/bash
BATREMAIN=`grep remaining /proc/acpi/battery/BAT1/state |cut -d " " -f8`
BATFULL=`grep last /proc/acpi/battery/BAT1/info |cut -d " " -f9`
BATPERCENT=$((100*$BATREMAIN/$BATFULL))
BATSTATE=`grep charging /proc/acpi/battery/BAT1/state |cut -d " " -f12`
echo mAh remaining $BATREMAIN
echo mAh capacity $BATFULL
echo percent charged $BATPERCENT
echo the battery is $BATSTATE


Similar things can be done with /proc/acpi/battery/BAT1/* ... this can be a template - just grep for a line with unique string and cut out the string you need from that line (using spaces as the separator or "delimiter")

and for temperature
Code:
CPU0TEMP=`grep temperature /proc/acpi/thermal_zone/TZ00/temperature |cut -d " " -f14`
echo CPU Temperature is $CPU0TEMP


Edit:
Not being sure how things may change it may be best to add
sed "s/: */ /" before cut so that the number of spaces for formatting doesn't change the result

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4378

PostPosted: Wed 28 Apr 2010, 21:05    Post subject:  

I cleaned it up some... may be able to use pieces in a script with your gtrayicon now

Code:
#!/bin/ash
getprocinfo() {
#/proc/file string_number_in_line string_always_in_line_but_not_others
   grep $3 $1 |sed "s/: */ /" |cut -d " " -f $2
}
BATREMAIN=`getprocinfo /proc/acpi/battery/BAT1/state 3 remaining`
BATFULL=`getprocinfo /proc/acpi/battery/BAT1/info 4 last`
echo mAh remaining $BATREMAIN
echo mAh capacity $BATFULL
BATPERCENT=$((100*$BATREMAIN/$BATFULL))
BATSTATE=`getprocinfo /proc/acpi/battery/BAT1/state 3 charging`
echo percent charged $BATPERCENT
echo the battery is $BATSTATE
CPU0TEMP=`getprocinfo /proc/acpi/thermal_zone/TZ00/temperature 2 temp`
echo CPU Temperature is $CPU0TEMP C
LIDSTATUS=`getprocinfo /proc/acpi/button/lid/LID/state 2 state`
echo Lid is $LIDSTATUS
PLUGSTATUS=`getprocinfo /proc/acpi/ac_adapter/ACAD/state 2 state`
echo AC adapter is $PLUGSTATUS
KERNVER=`getprocinfo /proc/version 3 Linux`
echo Your Kernel is version $KERNVER
UPTIMESECS=`getprocinfo /proc/uptime 1 "."`
echo Your computer has been running for $UPTIMESECS seconds
IDLETIMESECS=`getprocinfo /proc/uptime 2 "."`
echo Your computer has been idle for $IDLETIMESECS seconds
MEMTOT=`getprocinfo /proc/meminfo 2 MemTotal`
echo Total RAM is $MEMTOT kb
MEMFREE=`getprocinfo /proc/meminfo 2 MemFree`
echo Total free RAM is $MEMFREE kb
SWPTOT=`getprocinfo /proc/meminfo 2 SwapTotal`
echo Total Swap is $SWPTOT kb
SWPFREE=`getprocinfo /proc/meminfo 2 SwapFree`
echo Total free Swap is $SWPFREE kb
[/code]
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Wed 28 Apr 2010, 22:05    Post subject:  

How would you use gtrayicon? It has only two states. Battery full, and battery empty? I supposes you could change the graphics out from underneath it, but it would be a hack, on top of an already quick and dirty kludge. What we should probably do is extend gtrayicon to do this sort of thing properly.

You could use that logic in Vattery, instead of using IBAM, but IBAM gives you a time left estimate, which is rather nice. In fact, I don't know why you wouldn't want to use IBAM in whatever solution you pick, it's not very big.

The only drawback is that it doesn't work on the Eee 701 (and maybe the 900) since their battery doesn't report its status correctly.

Well there is one other drawback, IBAM needs to be "trained." Initial results are really erratic until IBAM gets it's database configured.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 3 [34 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0801s ][ Queries: 12 (0.0106s) ][ GZIP on ]