help with color changing line battery status code

Help with creating, editing & fixing problems with skins

help with color changing line battery status code

November 18th, 2017, 3:08 pm
firoj
   [1 posts]

Hi, I am not able to set the color of the line battery status skin... The requirements are:
. if battery is in charging state > line color will be Blue
. if battery is fully charged > line color white
. if battery is greater than 30 and not charging then line color is green
. if battery less than 30 and not charging then line color red


---------------------------------------------------------------------------------
currently it just shows battery level and do not change color.

the code is :

Code: Select all

[Rainmeter]
Author=firoj
AppVersion=1.0
Update=1000

[Metadata]
Name=
Author=
Information=
License=
Version=

;===========================================
;  Line Battery
;===========================================

[Variables]
BarColor=0, 255, 64, 80
BarBack=2, 136, 174, 15

FontName=Calibri
FontColor=255, 255, 255, 200
FontHeight=14
AntiAlias=1

;-------------------------

[MeasurePower]
Measure=Plugin
PlugIn=PlugIns\PowerPlugin.dll
PowerState=PERCENT
UpdateDivider=10

;-------------------------


[MeterBar]
MeasureName=MeasurePower
Meter=BAR
X=0
Y=0
W=5
H=600
BarOrientation=VERTICAL
BarColor=#BarColor#

;-------------------------

[BarLine]
Meter=IMAGE
X=0
Y=0
W=5
H=600
SolidColor=#BarBack#




please help.... ugently required... i tried but didn't succeed..
Attachments
User avatar

Re: help with color changing line battery status code

November 18th, 2017, 3:59 pm
jsmorley
Developer   [16405 posts]

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
BarBack=127,127,127,255
Charging=2,97,255,255
FullyCharged=255,255,255,255
GreaterThan30=17,222,0,255
LessThan30=201,12,0,255

[MeasureStatus]
Measure=Plugin
PlugIn=PowerPlugin
PowerState=Status
UpdateDivider=10

[MeasurePercent]
Measure=Plugin
PlugIn=PowerPlugin
PowerState=Percent
UpdateDivider=10

[MeasureSetColors]
Measure=Calc
IfCondition=(MeasureStatus = 1)
IfTrueAction=[!SetOption MeterBar BarColor "#Charging#"]
IfCondition2=(MeasureStatus <> 1) && (MeasurePercent >= 30)
IfTrueAction2=[!SetOption MeterBar BarColor "#GreaterThan30#"]
IfCondition3=(MeasureStatus <> 1) && (MeasurePercent < 30)
IfTrueAction3=[!SetOption MeterBar BarColor "#LessThan30#"]
IfCondition4=(MeasurePercent = 100)
IfTrueAction4=[!SetOption MeterBar BarColor "#FullyCharged#"]

[MeterBar]
Meter=Bar
MeasureName=MeasurePercent
X=0
Y=0
W=5
H=600
SolidColor=#BarBack#
BarOrientation=VERTICAL


https://docs.rainmeter.net/manual/measures/general-options/ifconditions/
https://docs.rainmeter.net/manual/bangs/#SetOption

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: No registered users and 5 guests