Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!PauseMeasureGroup Timer]
[Variables]
; The time at which the timer / stopwatch is set or reset, in seconds (>0 for a timer, 0 for a stopwatch)
DefaultSeconds=10
DefaultMinutes=0
DefaultHours=0
AlarmBool=1
AlarmHours=2
AlarmMinutes=53
;Action
TimerAction=Play_sound
;CustomActions
Play_sound=[Play "#@#Calligraphy.wav"]
; Background's stroke colors (0 = mouse leave color, 1 = mouse hover color)
StrokeColor0=255,255,255,60
StrokeColor1=0,255,255,255
StrokeColorIndex=0
TextHighlightColor=0,240,20
HourColour=255,100,100,255
MinuteColour=255,170,0,255
SecondColour=128,255,0,255
TimerColor=100,100,200
; Seconds left to pass (for a timer), or seconds passed (for a stopwatch)
Seconds=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
; The amount of seconds by which the timer / stopwatch changes (<0 for a timer, >0 for a stopwatch)
Direction=-1
; Temporarily set to 1 when the timer / stopwatch is reset so the OnChangeAction below doesn't alter the Seconds above
Reset=0
Color1=255,255,255,200
Color2=128,255,0
Color3=255,255,0
;Do not touch
ResetAct=[!SetVariable Seconds "([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)"][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0]
WriteAll=[!WriteKeyValue Variables DefaultHours "[#*DefaultHours*]"][!WriteKeyValue Variables DefaultMinutes "[#*DefaultMinutes*]"][!WriteKeyValue Variables DefaultSeconds "[#*DefaultSeconds*]"][!WriteKeyValue Variables AlarmHours "[#*AlarmHours*]"][!WriteKeyValue Variables AlarmMinutes "[#*AlarmMinutes*]"]
[Shapes]
Meter=Shape
X=0
;Outer circle
Shape=Ellipse 31,31,30,30 | Fill Color 0,0,0,80 | StrokeWidth 2 | Stroke Color [#StrokeColor[#StrokeColorIndex]]
;Inner circle
Shape2=Ellipse 31,31,20,20 | Fill Color 0,0,0,60 | StrokeWidth 2 | Stroke Color [#StrokeColor[#StrokeColorIndex]]
;Line
Shape3=Line 62,31,193,31 | StrokeWidth 2 | Stroke Color [#StrokeColor0]
;Buttons box
Shape4=Rectangle 193,1,28,60,14 | Fill Color 0,0,0,130 | StrokeWidth 2 | Stroke Color [#StrokeColor0]
;-------------------------------------
;MeterStyles
;-------------------------------------
[Icons]
FontFace=Segoe MDL2 Assets
FontSize=9
FontWeight=500
FontColor=255,255,255
StringAlign=CenterCenter
AntiAlias=1
;-------------------------------------
;Time
;-------------------------------------
[Time.Hour]
Measure=Time
Format=%I
[Time.Minute]
Measure=Time
Format=%M
[Time.Second]
Measure=Time
Format=%S
[Time.Date]
Measure=Time
Format=%a, %#d %b
[Alarm.Main]
Measure=Time
Format=%#H:%#M
IfMatch=#AlarmHours#:#AlarmMinutes#
IfMatchAction=[Play "#@#Alarm.wav"]
Disabled=(1-#AlarmBool#)
DynamicVariables=1
[Time.Analog]
Meter=Shape
;Hour line
Shape=Line (31+21*cos(rad(-90+[Time.Hour]*360/12))),(31+21*sin(rad(-90+[Time.Hour]*360/12))),(31+29*cos(rad(-90+[Time.Hour]*360/12))),(31+29*sin(rad(-90+[Time.Hour]*360/12))) | StrokeWidth 3.5 | Stroke Color #HourColour#
;Minute line
Shape2=Line (31+21*cos(rad(-90+[Time.Minute]*360/60))),(31+21*sin(rad(-90+[Time.Minute]*360/60))),(31+29*cos(rad(-90+[Time.Minute]*360/60))),(31+29*sin(rad(-90+[Time.Minute]*360/60))) | StrokeWidth 3 | Stroke Color #MinuteColour#
;Second line
Shape3=Line (31+21*cos(rad(-90+[Time.Second]*360/60))),(31+21*sin(rad(-90+[Time.Second]*360/60))),(31+29*cos(rad(-90+[Time.Second]*360/60))),(31+29*sin(rad(-90+[Time.Second]*360/60))) | StrokeWidth 2 | Stroke Color #SecondColour#
DynamicVariables=1
Group=Main | Time
[Time.Digital]
Meter=String
X=127
Y=3
MeasureName=Time.Hour
MeasureName2=Time.Minute
MeasureName3=Time.Date
Text=%1:%2#CRLF#%3
FontSize=16
FontFace=Segoe UI
FontWeight=600
FontColor=255,255,255
AntiAlias=1
StringAlign=Center
InlinePattern=#CRLF#(.*)
InlineSetting=Size | 9
InlinePattern2=(.*)#CRLF#
InlineSetting2=CharacterSpacing | 1.5
Group=Main | Time
;----------------------------------------
;Timer
;----------------------------------------
[Timer.Main]
Measure=Time
Format=%S
OnChangeAction=[!SetVariable Seconds (#Seconds#+#Direction#*(1-#Reset#))]
DynamicVariables=1
Group=Timer
[Timer.Uptime]
Measure=Uptime
SecondsValue=#Seconds#
Format=%3!02i!:%2!02i! %1!02i!
MaxValue=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
IfCondition=(#CURRENTSECTION#<=0) && (Sgn(#Direction#)=-1) && (#Reset#=0)
IfTrueAction=[!PauseMeasureGroup Timer][#[#TimerAction]][#ResetAct][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]
IfConditionMode=1
DynamicVariables=1
Group=Timer
[Timer.Play]
Meter=String
MeterStyle=Icons
Text=[\xE768]
X=207
Y=14
Group=Main
LeftMouseUpAction=[!HideMeterGroup Main][!ShowMeterGroup Timer][!Redraw][!UnpauseMeasureGroup Timer]
[Timer.Pause]
Meter=String
MeterStyle=Icons
Text=[\xE769]
X=207
Y=14
Group=Main | Timer
Hidden=1
LeftMouseUpAction=[!PauseMeasureGroup Timer][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]
[Timer.Reset]
Meter=String
MeterStyle=Icons
Text=[\xE72C]
X=207
Y=48
Group=Main | Timer
Hidden=1
LeftMouseUpAction=[#ResetAct][!UpdateMeter Timer.Digital][!HideMeter Timer.Pause][!ShowMeter Timer.Play][!Redraw]
[Timer.Analog]
Meter=RoundLine
X=31
Y=31
MeasureName=Timer.Uptime
LineStart=21
LineLength=29
LineWidth=2
StartAngle=(Rad(270))
Antialias=1
Solid=1
LineColor=#TimerColor#
LineWidth=5
Group=Main | Timer
Hidden=1
[Timer.Digital]
Meter=String
X=127
Y=3
MeasureName=Timer.Uptime
MeasureName2=Time.Hour
MeasureName3=Time.Minute
Text=%1#CRLF##TimerAction# • %2:%3
FontSize=16
FontFace=Segoe UI
FontWeight=600
FontColor=255,255,255
AntiAlias=1
StringAlign=Center
InlinePattern=^.*(\s.*)#CRLF#
InlineSetting=Size | 10
InlinePattern2=^.*(\s.*)#CRLF#
InlineSetting2=Weight | 700
InlinePattern3=#CRLF#(.*)
InlineSetting3=Size | 9
InlinePattern3=(.*)#CRLF#
InlineSetting3=CharacterSpacing | 1.5
Group=Main | Timer
Hidden=1
;--------------------------------------
;Settings
;--------------------------------------
[Settings.ActionTimer]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Show,2,20
ActionList2=Repeat Hide,2,20
Show=[!SetVariable Animation "(Clamp(#Animation#+0.05, 0, 1))"][!UpdateMeterGroup Animation][!UpdateMeasure Settings.ActionTimer][!Redraw]
Hide=[!SetVariable Animation "(Clamp(#Animation#-0.05, 0, 1))"][!UpdateMeterGroup Animation][!UpdateMeasure Settings.ActionTimer][!Redraw]
DynamicVariables=1
UpdateDivider=-1
[Settings.Icon]
Meter=String
MeterStyle=Icons
Text=[\xE713]
X=207
Y=48
Group=Main
LeftMouseUpAction=[#ResetAct][!UpdateMeter Settings.Timer.Digital][!HideMeterGroup Main][!ShowMeterGroup Settings][!HideMeterGroup AlarmSettings][!Redraw]
[Settings.Done]
Meter=String
MeterStyle=Icons
Text=[\xE73E]
X=207
Y=31
Group=Settings
DynamicVariables=1
Hidden=1
LeftMouseUpAction=[#WriteAll][!HideMeterGroup Settings][!ShowMeterGroup Main][!HideMeterGroup Timer][!Redraw]
[Settings.Timer]
Meter=String
MeterStyle=Icons
Text=[\xE823]
X=207
Y=14
Group=Settings
Hidden=1
LeftMouseUpAction=[!HideMeterGroup AlarmSettings][!ShowMeterGroup TimerSettings][!Redraw]
[Settings.Alarm]
Meter=String
MeterStyle=Icons
Text=[\xEA8F]
X=207
Y=48
Group=Settings
Hidden=1
LeftMouseUpAction=[!HideMeterGroup TimerSettings][!ShowMeterGroup AlarmSettings][!Redraw]
[Settings.Timer.Digital]
Meter=String
MeterStyle=Timer.Digital
Text=%1#CRLF#
InlinePattern4=^$
InlineSetting4=Color | #TextHighlightColor#
DynamicVariables=1
Group=Settings | TimerSettings
[Settings.Timer.Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultHours "([#DefaultHours]=99 ? 0 : [#DefaultHours]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultHours "([#DefaultHours]=0 ? 99 : [#DefaultHours]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings | TimerSettings
H=25
W=25
X=-36r
Y=r
[Settings.Timer.Minutes]
Meter=Image
MeterStyle=Settings.Timer.Hours
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^.*:(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultMinutes "([#DefaultMinutes]=59 ? 0 : [#DefaultMinutes]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultMinutes "([#DefaultMinutes]=0 ? 59 : [#DefaultMinutes]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
X=4R
[Settings.Timer.Seconds]
Meter=Image
MeterStyle=Settings.Timer.Hours
MouseOverAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^.*\s(\d{2})"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Timer.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Timer.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable DefaultSeconds "([#DefaultSeconds]=59 ? 0 : [#DefaultSeconds]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DefaultSeconds "([#DefaultSeconds]=0 ? 59 : [#DefaultSeconds]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup Timer][!UpdateMeasureGroup Timer][!PauseMeasureGroup Timer][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
H=22
X=2R
Y=3r
[Settings.Alarm.Uptime]
Measure=Uptime
SecondsValue=(#AlarmHours#*3600+#AlarmMinutes#*60)
Format=%3!02i!:%2!02i!
DynamicVariables=1
[Settings.Alarm.Digital]
Meter=String
MeasureName=Settings.Alarm.Uptime
Text=%1#CRLF#
MeterStyle=Time.Digital
Hidden=1
InlinePattern4=^$
InlineSetting4=Color | #TextHighlightColor#
DynamicVariables=1
Group=Settings | AlarmSettings
[Settings.Alarm.Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^(\d{2})"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable AlarmHours "([#AlarmHours]=23 ? 0 : [#AlarmHours]+1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollDownAction=[!SetVariable AlarmHours "([#AlarmHours]=0 ? 23 : [#AlarmHours]-1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
DynamicVariables=1
Hidden=1
Group=Settings | AlarmSettings
H=25
W=25
X=(-[Settings.Alarm.Digital:W]/2+3)r
Y=r
[Settings.Alarm.Minutes]
Meter=Image
MeterStyle=Settings.Alarm.Hours
MouseOverAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^.*:(\d{2})"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseLeaveAction=[!SetOption Settings.Alarm.Digital InlinePattern4 "^$"][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollUpAction=[!SetVariable AlarmMinutes "([#AlarmMinutes]=59 ? 0 : [#AlarmMinutes]+1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
MouseScrollDownAction=[!SetVariable AlarmMinutes "([#AlarmMinutes]=0 ? 59 : [#AlarmMinutes]-1)"][!UpdateMeasure Settings.Alarm.Uptime][!UpdateMeter Settings.Alarm.Digital][!Redraw]
X=6R
[Settings.Alarm.Toggle.Measure]
Measure=String
String=[#AlarmBool]
IfCondition=Settings.Alarm.Toggle.Measure=1
IfTrueAction=[!EnableMeasure Alarm.Main]
IfFalseAction=[!DisableMeasure Alarm.Main]
Substitute="0":"[\xF19E]", "1":"[\xF19F]"
DynamicVariables=1
[Settings.Alarm.Toggle]
Meter=String
MeterStyle=Icons
FontSize=15
X=31
Y=32
Hidden=1
Group=Settings | AlarmSettings
MeasureName=Settings.Alarm.Toggle.Measure
LeftMouseUpAction=[!SetVariable AlarmBool (1-[#AlarmBool])][!WriteKeyValue Variables AlarmBool "[#AlarmBool]"][!UpdateMeasure Settings.Alarm.Toggle.Measure][!UpdateMeter Settings.Alarm.Toggle][!Redraw]