It is currently May 8th, 2024, 12:47 am

Help with showing Battery Life (Gnometer 1.3)

Get help with creating, editing & fixing problems with skins
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

So basically I cant get the battery life to show. All i get is "local-time"
The code is
[mLifetime]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll

PowerState=LIFETIME
Format=locale-time
Substitute="Unknown":"00:00"

and i did some googling and found out that there might be a problem with my system because local-time should show up as my system's time format. And being relatively new to this, i'm not exactly sure how to fix it. I run Win7 and if anyone can help, please do.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with showing Battery Life (Gnometer 1.3)

Post by jsmorley »

[MeasurePower]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=LIFETIME
Format=locale-time

[MeterPower]
Meter=String
FontSize=13
FontColor=255,255,255,255
MeasureName=MeasurePower

Works for me... You might want to check under "Region and Language" in Windows to see if something is amiss there.
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Re: Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

well this is the whole skin
[Rainmeter]
Author=poiru
AppVersion=1003000
Update=1000
MouseActionCursor=0
MiddleMouseDownAction=!RainmeterDeactivateConfig
BackgroundMode=1

[Metadata]
Name=Battery
Description=Shows your laptop battery usage.
Instructions=Click on the icon to open the Power Options control panel applet.
Version=1.3.0.2
License=Creative Commons BY-NC-SA 3.0

[Variables]
skin.Style=Horizontal
@Include=#ROOTCONFIGPATH#SETTINGS\Variables.inc
skin.Width=#width.Battery#

; MEASURES ====================================

[mPercent]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=PERCENT
MaxValue=101
MinValue=0
UpdateDivider=5

[mAC]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=ACLINE
IfAboveValue=0
IfAboveAction=!Execute [!RainmeterShowMeter Charging][!RainmeterRedraw]
IfBelowValue=1
IfBelowAction=!Execute [!RainmeterHideMeter Charging][!RainmeterRedraw]
UpdateDivider=5

[mLifetime]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll

PowerState=LIFETIME
Format=locale-time
Substitute="Unknown":"00:00"

; STYLES ======================================

@Include2=#ROOTCONFIGPATH#SETTINGS\Style#skin.Style#.inc

; METERS ======================================

[Line]
Meter=IMAGE
MeterStyle=sLine

[Icon]
Meter=BITMAP
MeterStyle=sIcon
MeasureName=mPercent
BitmapImage=Battery.png
BitmapFrames=6
BitmapZeroFrame=0
LeftMouseUpAction=!Execute [control.exe powercfg.cpl]
ToolTipText="Open Power Options"
MouseActionCursor=1
UpdateDivider=5

[Charging]
Meter=IMAGE
MeterStyle=sIcon
ImageName=Charging.png
X=14r
Y=14r
W=8
H=8

[Title]
Meter=STRING
MeterStyle=sTitle
Text=Battery

[Subtitle]
Meter=STRING
MeterStyle=sSubtitle
MeasureName=mPercent
MeasureName2=mLifetime
Text="%1%, %2 left"

[Gap]
Meter=IMAGE
MeterStyle=sGapNP

so exactly where would i post yours in between or replace?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with showing Battery Life (Gnometer 1.3)

Post by jsmorley »

You should not have to. What you have looks fine to me.

Run the skin, then from the Rainmeter notification area icon, right click and say "About". Now go find that skin in the list on the left. What is that "mLifetime" measure showing under "Message"?
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Re: Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

it shows
Measure Range Value
mPercent 0.0-101.0 71.0
mAC 0.0-1.0 1.0
mLifetime 0.0-4.0G 00:00
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with showing Battery Life (Gnometer 1.3)

Post by jsmorley »

Comment out that Substitute= line on the measure, by putting a ";" at the start:

[mLifetime]
Measure=Plugin
Plugin=Plugins\PowerPlugin.dll
PowerState=LIFETIME
Format=locale-time
;Substitute="Unknown":"00:00"

Now refresh the skin and do that "About" thing again. What does it say now?
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Re: Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

It says Unknown now for the value
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with showing Battery Life (Gnometer 1.3)

Post by jsmorley »

Ok, so the skin is working perfectly. The problem seems to be that the Power plugin doesn't recognize your battery for some reason. You running any other "battery management" software of any kind other than what comes with Windows?
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Re: Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

hmm well im using sony vaio. I'm using the power managment plan where i charge only up to 80%. could that be it?
seanwammo
Posts: 10
Joined: August 9th, 2011, 7:04 pm

Re: Help with showing Battery Life (Gnometer 1.3)

Post by seanwammo »

i tried turning that off and it didnt change anything