It is currently March 28th, 2024, 1:58 pm

Laptop Battery Skin for illustro theme

Get help with creating, editing & fixing problems with skins
Post Reply
thelostvoid
Posts: 1
Joined: January 24th, 2011, 10:51 am
Location: Springhurst, VIC, Australia

Laptop Battery Skin for illustro theme

Post by thelostvoid »

Hi,

Im rather new to all of this, and this is my first post, Hi guys and gals :welcome:

I have tried multiple searches for the code to make a skin to show laptop power and and remaining battery, however I can't seem to find it (or I have found it and not know what it was). Im trying to learn some of the code used in rainmeter, but coding the whole thing for laptop power and making it match the illustro theme is beyond me for the time being.

So I have I missed the code somewhere or is there already a illustro battery/power moniter that I haven't already found?

Thanks in advance for any and all help.
Zeke3711
Posts: 5
Joined: April 6th, 2017, 8:36 pm

Re: Laptop Battery Skin for illustro theme

Post by Zeke3711 »

I know I'm a little late, just came across this. I had the same issue but managed to solve it. I downloaded a battery skin for another theme and used the measures from it and put them into a disk skin. I removed the disk parts and changed the meter to battery percent. Here is my code in case you're interested

Code: Select all

; Lines starting ; (semicolons) are commented out.

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Battery
Author=Zeke3711
Information=Displays battery usage.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=0,175,255,255
colorText=255,255,255,255

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Battery

[mPowerPercent]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=PERCENT
UpdateDivider=20

[mPowerSource]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=ACLINE
Substitute="1":"Charging","0":"Discharging"
UpdateDivider=20

[mPowerRemain]
Measure=Plugin
Plugin=PowerPlugin.dll
PowerState=LIFETIME
Format="%#H:%M remaining"
Substitute="Unknown":""
UpdateDivider=20

[sBattery]
Measure=Script
ScriptFile=#@#\Scripts\Battery.lua
UpdateDivider=20


; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterBattGraph]
Meter=BAR
MeasureName=mPowerPercent
BarOrientation=HORIZONTAL
X=10
Y=54
H=1
W=188
BarColor=0,175,255,255
SolidColor=255,255,255,15
AntiAlias=1
AutoScale=1
UpdateDivider=20
Group=BG

[meterBGIcon7]
Meter=IMAGE
Path=#IMAGES#\Icons\
ImageName=BatteryPlug.png
X=85
Y=30
W=40
H=10
;MouseOverAction=!Execute [!UpdateMeter meterBatteryText][!ShowMeter meterBatteryText][!Redraw]
;MouseLeaveAction=!Execute [!HideMeter meterBatteryText][!Redraw]
PreserveAspectRatio=1
DynamicVariables=1
UpdateDivider=20
Group=BG

[meterBatteryText]
Meter=STRING
MeasureName=mPowerPercent
MeasureName2=mPowerSource
MeasureName3=mPowerRemain
StringStyle=NORMAL
FontColor=255, 255, 255, 255
FontSize=8
StringAlign=Right
FontFace=Trebuchet MS
X=200
Y=40
Text="[%1%]"
UpdateDivider=20
AntiAlias=1

[meterBatteryText2]
Meter=STRING
MeasureName=mPowerPercent
MeasureName2=mPowerSource
MeasureName3=mPowerRemain
StringStyle=BOLD
FontFace=Trebuchet MS
FontColor=255, 255, 255, 150
FontSize=8
StringAlign=Center
X=103
Y=60
Text=%3
UpdateDivider=20
AntiAlias=1

[meterBatteryText3]
Meter=STRING
MeasureName=mPowerPercent
MeasureName2=mPowerSource
MeasureName3=mPowerRemain
StringStyle=BOLD
FontFace=Trebuchet MS
FontColor=255, 255, 255, 255
FontSize=8
StringAlign=Left
X=10
Y=40
Text=%2
UpdateDivider=20
AntiAlias=1
Post Reply