It is currently April 26th, 2024, 3:35 am

Looking for curved battery skin

Get help with creating, editing & fixing problems with skins
AtleastItrid
Posts: 9
Joined: March 11th, 2017, 1:41 pm

Looking for curved battery skin

Post by AtleastItrid »

I tried to make a battery meter that fits my background. That would be a quarter circle, but I can't manage to do this. So did anyone else do it already?
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Looking for curved battery skin

Post by balala »

Probably it's not impossible at all, but I'm not sure how exactly would you like to do it. What the quarter circle should be and how the skin should work? You'd like to fill the quarter circle depending on the lifetime of the battery, or...?
So, please come back with some details.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking for curved battery skin

Post by eclectic-tech »

While waiting for more details, here's and example of 4 curved battery power meters, simply choose which quadrant you want, hide the other 3 meters, and modify the settings for line widths and colors. Didn't test on a laptop, but instructions for the Power Plugin are available in the manual.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#

; ========= Variables ==========
[Variables]


; ========= Measures ==========
[MeasurePower]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
; Type of information to measure. Valid 'PowerState' values are:
; ACLine: 0 for battery or 1 when plugged in.
; Status: 0 for no battery, 1 for charging, 2 for critical, 3 for low, or 4 for above low.
; Status2: Equal to BatteryFlag in SYSTEM_POWER_STATUS.
; Lifetime: Battery lifetime.
; Percent: Battery lifetime as a percentage.
; Hz: Current CPU frequency in Hz.
; MHz: Current CPU frequency in MHz.
; 
; Format=
; 'Format' of the time with PowerState=Lifetime. The syntax is the same as Time measures.
; 
; Note: Battery information may not be available with some laptops.

; ========= Meters ==========
[MeterRoundlineUpperRightQuadrant]
Meter=Roundline
MeasureName=MeasurePower
X=0
Y=0
W=100
H=100
LineColor=255,255,255
LineWidth=1
LineLength=40
LineStart=50
StartAngle=(Rad(270))
RotationAngle=(Rad(90))
Solid=1
AntiAlias=1

[MeterRoundlineLowerRightQuadrant]
Meter=Roundline
MeasureName=MeasurePower
X=0
Y=0
W=100
H=100
LineColor=255,255,255
LineWidth=1
LineLength=40
LineStart=50
StartAngle=(Rad(0))
RotationAngle=(Rad(90))
Solid=1
AntiAlias=1

[MeterRoundlineLowerLeftQuadrant]
Meter=Roundline
MeasureName=MeasurePower
X=0
Y=0
W=100
H=100
LineColor=255,255,255
LineWidth=1
LineLength=40
LineStart=50
StartAngle=(Rad(90))
RotationAngle=(Rad(90))
Solid=1
AntiAlias=1

[MeterRoundlineUpperLeftQuadrant]
Meter=Roundline
MeasureName=MeasurePower
X=0
Y=0
W=100
H=100
LineColor=255,255,255
LineWidth=1
LineLength=40
LineStart=50
StartAngle=(Rad(180))
RotationAngle=(Rad(90))
Solid=1
AntiAlias=1

[MeterImageXLine]
Meter=Image
ImageName=
X=0
Y=50
W=100
H=1
SolidColor=32,32,32

[MeterImageYLine]
Meter=Image
ImageName=
X=50
Y=0
W=1
H=100
SolidColor=32,32,32

[MeterRoundlineCircle]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineColor=32,32,32
LineWidth=1
LineLength=50
LineStart=49
StartAngle=(Rad(0))
RotationAngle=(Rad(360))
Solid=1
AntiAlias=1
batt.gif
You do not have the required permissions to view the files attached to this post.
AtleastItrid
Posts: 9
Joined: March 11th, 2017, 1:41 pm

Re: Looking for curved battery skin

Post by AtleastItrid »

Thanks, I didn't know how to use roundline. Now I got what I wanted:

http://i.imgur.com/tKCaQXS.jpg

Code: Select all

[Rainmeter]
Update=300
AccurateText=1

[Metadata]
Name=
Author=
Information=
Version=
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0
[MeasurePower]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
IfCondition=MeasurePower < 15
IfTrueAction=[!SetOption Battery LineColor 204,0,0]
IfCondition2=14 < MeasurePower < 65
IfTrueAction2=[!SetOption Battery LineColor 255,255,0]
IfCondition3=MeasurePower > 64
IfTrueAction3=[!SetOption Battery LineColor 0,255,0]
Updatedivider=200
[Battery]
Meter=Roundline
MeasureName=MeasurePower
X=10
Y=10
W=1000
H=1200
LineColor=255,255,255
LineWidth=1
LineLength=404
LineStart=407
StartAngle=(Rad(220))
RotationAngle=(Rad(100))
Solid=1
AntiAlias=1
[Charge]
Measure=Plugin
Plugin=PowerPlugin
PowerState=ACLine
IfCondition=Charge=1
IfTrueAction=[!SetOption Image Hidden 0]
IfFalseAction=[!SetOption Image Hidden 1]
OnUpdateAction=[!UpdateMeter Image][!Redraw]
[Image]
Meter=Image
Imagename=Image
X=670
Y=130
W=100	
H=100
Antialias=1
Hidden=0
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking for curved battery skin

Post by eclectic-tech »

Good Looking Desktop!

Glad to help!