It is currently March 28th, 2024, 8:33 am

Laptop power/battery skin

Get help with creating, editing & fixing problems with skins
Bub
Posts: 37
Joined: April 2nd, 2014, 3:52 pm

Re: Laptop power/battery skin

Post by Bub »

So what should I use to make it faster?

P.S. link was PM'ed to you
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Laptop power/battery skin

Post by balala »

Bub wrote:P.S. link was PM'ed to you
Please post the link publicly. You could get better replies from others too, like what I can offer.
Bub
Posts: 37
Joined: April 2nd, 2014, 3:52 pm

Re: Laptop power/battery skin

Post by Bub »

Sure just wasn't sure I can post rar files here, especially with such a messed up skins :oops:
Attachments
skin_001.rar
(1.88 MiB) Downloaded 44 times
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Laptop power/battery skin

Post by balala »

Bub wrote:Right now it's Substitute="0":"NO BATTERY","1":"CHARGING","2":"CRITICAL","3":"LOW","4":"ABOVE LOW"
Been trying to figure out how to make it work this way - "CHARGING" till 99%, "CHARGED" at 100% OR even better nothing at %100 instead of "Charged" or "Above Low" or anything...
Remove the Substitute option of the [MeasureStatus] measure, then add to the [MeasurePercent] measure, beside the existing options, the following ones:

Code: Select all

[MeasurePercent]
...
IfCondition=(#CURRENTSECTION#=100)
IfTrueAction=[!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charged',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
IfFalseAction=[!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charging',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
Bub wrote:And then at 100% change from BarImage animated to BarColor solid color as it does right now between charging / on battery. If it possible to make BarColor after 100% charged fade in / fade out in circle of few seconds, it will be perfect. If it's too much headache, then just change to solid color or image (if you can show me both options... :oops: )
For this you have to add some further !ShowMeter and !HideMeter bangs to the above IfTrueAction and IfFalseAction options, as it follows, along with removing these bangs from the IfTrueAction and IfFalseAction options of the [MeasureACLine] measure:

Code: Select all

[MeasurePercent]
...
IfCondition=(#CURRENTSECTION#=100)
IfTrueAction=[!HideMeter "MeterBatteryBar1"][!ShowMeter "MeterBatteryBar2"][!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charged',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
IfFalseAction=[!ShowMeter "MeterBatteryBar1"][!HideMeter "MeterBatteryBar2"][!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charging',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
Bub wrote:And last problem is control animation speed. Been trying to change Update numbers from 10 to 500 and nothing happens with speed. For sure I do something wrong but what...
You have two Update options: first in the [Variables] section of the skin (this is useless, the Update option doesn't belong to this section, but to [Rainmeter]) and the second one in the [Rainmeter] section of the Options.inc file (@Resources folder). Although isn't a common thing to use a such section in an included file, it seems nor banned isn't. Here you've used Update=1000. Reduce this value. For me Update=100 seems a good value.
But now there is a problem: Update=100 means 10 updates per second (as Update is given in milliseconds). Doesn't worth to update so often the skin. To avoid this inconvenience, add a DefaultUpdateDivider=10 (or make in a way to have the product of Update and DefaultUpdateDivider equal with 1000) to the [Rainmeter] section of the skin (or if you prefere, to the same section of the Options.inc file), along with an UpdateDivider=1 option to the [MeterBatteryBar1] meter and a same one to the [ImageNumberCalc] measure.
Bub
Posts: 37
Joined: April 2nd, 2014, 3:52 pm

Re: Laptop power/battery skin

Post by Bub »

balala wrote:Remove the Substitute option of the [MeasureStatus] measure, then add to the [MeasurePercent] measure, beside the existing options, the following ones:

Code: Select all

[MeasurePercent]
...
IfCondition=(#CURRENTSECTION#=100)
IfTrueAction=[!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charged',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
IfFalseAction=[!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charging',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
For this you have to add some further !ShowMeter and !HideMeter bangs to the above IfTrueAction and IfFalseAction options, as it follows, along with removing these bangs from the IfTrueAction and IfFalseAction options of the [MeasureACLine] measure:

Code: Select all

[MeasurePercent]
...
IfCondition=(#CURRENTSECTION#=100)
IfTrueAction=[!HideMeter "MeterBatteryBar1"][!ShowMeter "MeterBatteryBar2"][!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charged',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]
IfFalseAction=[!ShowMeter "MeterBatteryBar1"][!HideMeter "MeterBatteryBar2"][!SetOption MeasureStatus Substitute """"0":'NO BATTERY',"1":'Charging',"2":'CRITICAL',"3":'Low',"4":'Above Low'"""][!UpdateMeasure "MeasureStatus"]

You see here is a problem. I was able to make two skins working for single bar.
But the question was how to make it work this way:
While ON BATTERY it shows MeterBatteryBar2
When PLUGGED AND CHARGING it shows MeterBatteryBar1
While when PLUGGED AND FULLY CHARGED it switching back to solid color MeterBatteryBar2 OR any other Meter (theoretically let say MeterBatteryBar3 with different animation)

Right now with your updates it shows animated skin at any lvl less than 100% charge, no matter it's charging, connected or on battery. Question was how to make 3, not 2 variations work for 3 different states - Unplagged On Battery, Plugged AND Charging, Plugged and Fully Charged.

Same with Substitute - is it possible to remove any text while Plugged AND Fully Charged instead of having strange "Above Low"?
Is it mandatory to have 5 positions (0,1,2,3,4) Or it could be just a few?

You have two Update options: first in the [Variables] section of the skin (this is useless, the Update option doesn't belong to this section, but to [Rainmeter]) and the second one in the [Rainmeter] section of the Options.inc file (@Resources folder). Although isn't a common thing to use a such section in an included file, it seems nor banned isn't. Here you've used Update=1000. Reduce this value. For me Update=100 seems a good value.
But now there is a problem: Update=100 means 10 updates per second (as Update is given in milliseconds). Doesn't worth to update so often the skin. To avoid this inconvenience, add a DefaultUpdateDivider=10 (or make in a way to have the product of Update and DefaultUpdateDivider equal with 1000) to the [Rainmeter] section of the skin (or if you prefere, to the same section of the Options.inc file), along with an UpdateDivider=1 option to the [MeterBatteryBar1] meter and a same one to the [ImageNumberCalc] measure.

I am kind of slow I guess...
Did what you said, nothing is changed. Same speed as was before for all meters...
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Laptop power/battery skin

Post by balala »

Bub wrote:While ON BATTERY it shows MeterBatteryBar2
When PLUGGED AND CHARGING it shows MeterBatteryBar1
While when PLUGGED AND FULLY CHARGED it switching back to solid color MeterBatteryBar2 OR any other Meter (theoretically let say MeterBatteryBar3 with different animation)
And what should have to happen (what should have to be shown) if the computer has no battery?
Bub
Posts: 37
Joined: April 2nd, 2014, 3:52 pm

Re: Laptop power/battery skin

Post by Bub »

balala wrote:And what should have to happen (what should have to be shown) if the computer has no battery?
...I guess it's not gonna power up at all :lol: So no picture will display :lol:
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Laptop power/battery skin

Post by balala »

Bub wrote:...I guess it's not gonna power up at all :lol: So no picture will display :lol:
But it does. I'm using my laptop this way, that's why I asked.
If no bar meter should have to be shown, it's ok. Working on the solution.
Bub
Posts: 37
Joined: April 2nd, 2014, 3:52 pm

Re: Laptop power/battery skin

Post by Bub »

balala wrote:But it does. I'm using my laptop this way, that's why I asked.
If no bar meter should have to be shown, it's ok. Working on the solution.
As a matter of fact I do have laptop with no battery (empty slot) installed. Old model and battery cost twice more than laptop lol. Keeping it at my parents house to check emails and such while visiting them. To be honest with you I am a desktop guy and prefer to have solid powerful rig instead of mobility. This is for my kiddo gaming laptop and I may copy it to my since we both got same model (my first laptop ever and I am close to my 50's)
As for THIS laptop then to remove battery (physically) I need to open case and unscrew it from frame.
So I guess only situation with NO BATTERY in this case is if battery is dead. In this case I'll get enough warnings from windows and bios to be ready, I guess. Fingers crossed not gonna happen in near future...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Laptop power/battery skin

Post by eclectic-tech »

In order to change the animation speed, delete the [Rainmeter] section that is in your #@#OPTIONS.INC file; you have Update=1000 in that file, so that overrides anything you change in the [Rainmeter] section in your skin. Now set Update=100 in your skin to see the animation speed up.

Have not tried any of the other changes balala suggested, but if you are still having issues, let's handle them 1 by 1...


balala already corrected this earlier... :oops:
Post Reply