Code: Select all
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
OnRefreshAction=[!PauseMeasureGroup TimerGroup][!SetOption #ActionText# FillAlpha "FillColor #Color2#"]
[Metadata]
Name=Countdown Timer
Author=Yincognito, death.crafter, balala, eclectic-tech, jsmorley, Krzysztof "gronostaj" Smialek
Information=Originally written by Yincognito and death.crafter on the Rainmeter forum. But I added extra features and combined it with my own version of a skin design by Krzysztof "gronostaj" Smialek
Version=2021.8.3
License=CC BY 3.0
[Variables]
RClick=ms-settings:dateandtime
HourColour=255,100,100,255
MinuteColour=255,170,0,255
SecondsColour=128,255,0,255
TimerColor=100,100,200
ChimeSound=Calligraphy.wav
; ChimeSound disabled whilst these apps are running
Process1=VLC.exe
Process2=foobar2000.exe
Process3=MuLab.exe
; Background's stroke colors (0 = mouse leave color, 1 = mouse hover color)
StrokeColor0=255,255,255,60
StrokeColor1=0,255,255,255
StrokeColorIndex=0
; The time at which the timer / stopwatch is set or reset, in seconds (>0 for a timer, 0 for a stopwatch)
DefaultHours=2
DefaultMinutes=10
DefaultSeconds=0
; 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
Alarm=Alarm.wav
APP1=Dolphin.exe
APP2=pcsx2.exe
APP3=rpcs3.exe
APP4=retroarch.exe
APP5=cemu.exe
Alarm=Alarm.wav
AlarmHourSet=23
AlarmMinuteSet=0
;AlarmTime=7.05
;OffTime=7.15 - can delete-works ok
Hibernate=rundll32.exe powrprof.dll,SetSuspendState
Shutdown=shutdown.exe -s -t 5 -f
Lock=rundll32.exe user32.dll, LockWorkStation
CloseApps=!CommandMeasure mClose Run
Off=
Act=rundll32.exe user32.dll, LockWorkStation
ActionText=Off
Message1=10 mins until #ActionText# !!
Message2=#ActionText# Now !!
========================================
; Process
========================================
;[mProcessTimerStart]
;Measure=Calc
;Formula=1
;IfCondition=(mProcessRainmeter=1)
;IfTrueAction=[!EnableMeasureGroup Timers][!UpdateMeasureGroup Timers][!Redraw]
;IfFalseAction=[!DisableMeasureGroup Timers][!UpdateMeasureGroup Timers][!Redraw]
;
;[mProcessRainmeter]
;Measure=Plugin
;Plugin=Process
;ProcessName=Rainmeter.exe
========================================
; EMULATORS
========================================
[mProcessEmu]
Measure=Calc
Formula=1
IfCondition=(mProcessDolphin=1) || (mProcessPCSX2=1) || (mProcessRPCS3=1) || (mProcessN64=1) || (mProcessRetroArch=1) || (mProcessCemu=1)
IfTrueAction=[!ActivateConfig "RM\ScreenSaver" "ScreenSaver v2.ini"]
IfFalseAction=[!DeactivateConfig "RM\ScreenSaver" "ScreenSaver v2.ini"]
[mProcessDolphin]
Measure=Plugin
Plugin=Process
ProcessName=Dolphin.exe
[mProcessPCSX2]
Measure=Plugin
Plugin=Process
ProcessName=pcsx2.exe
[mProcessRPCS3]
Measure=Plugin
Plugin=Process
ProcessName=rpcs3.exe
[mProcessN64]
Measure=Plugin
Plugin=Process
ProcessName=Project64.exe
[mProcessRetroArch]
Measure=Plugin
Plugin=Process
ProcessName=retroarch.exe
[mProcessCemu]
Measure=Plugin
Plugin=Process
ProcessName=Cemu.exe
========================================
; Background
========================================
[Bg]
Meter=Shape
Shape=Rectangle 2,2,60,60,50 | Fill Color 0,0,0,150 | StrokeWidth 2 | Extend StrokeAlpha
Shape2=Rectangle 11,11,42,42,50 | Fill Color 0,0,0,1 | StrokeWidth 2 | Extend StrokeAlpha2
Shape3=Rectangle 7,7,50,50,50 | Fill Color 0,0,0,1 | StrokeWidth 10 | Stroke Color 255,255,255,20
StrokeAlpha=Stroke Color #StrokeColor0#
StrokeAlpha2=Stroke Color #StrokeColor0#
LeftMouseUpAction=[!EnableMeasure mChimeHour] [!ShowMeter ChimeIcon] [!SetOption Bg StrokeAlpha2 "Stroke Color #StrokeColor0#"] [!DisableMeasureGroup ALARM] [!HideMeterGroup AlarmSet][!SetOption Action Text "#ActionText#"] [PlayStop "#Alarm#"] [!Update][!UpdateMeter *][!Redraw]
RightMouseUpAction=[!DisableMeasure mChimeHour] [!HideMeter ChimeIcon] [!SetOption Bg StrokeAlpha2 "Stroke Color 128,255,0,200"] [!EnableMeasureGroup ALARM] [!ShowMeter HourAlarm] [!ShowMeter MinuteAlarm] [!Update][!UpdateMeter *][!Redraw]
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 0,255,255,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #StrokeColor0#"][!UpdateMeter *][!Redraw]
DynamicVariables=1
ToolTipText="L - Alarm Off#CRLF#R - Alarm On"
Padding=5,5,10,5
[BgLine]
Meter=Shape
Shape=Rectangle 61,37,99,1,0 | Fill Color #StrokeColor0# | StrokeWidth 0
Shape2=Rectangle 160,0,30,60,15 | Fill Color 0,0,0,150 | StrokeWidth 2 | Stroke Color #StrokeColor0#
DynamicVariables=1
Padding=5,5,10,5
========================================
; STYLES
========================================
[sAllText]
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=Center
FontSize=16
FontColor=#Color1#
StringEffect=Shadow
FontEffectColor=0,0,0,150
AntiAlias=1
InlineSetting=Size | 8
InlinePattern=#CRLF#.+
FontFace=Aller
FontSize=16
FontWeight=650
StringEffect=Shadow
FontEffectColor=0,0,0,150
SolidColor=0,0,0,1
AntiAlias=1
DynamicVariables=1
[sRoundBar]
LineStart=22
LineLength=29
LineWidth=2
StartAngle=(Rad(270))
Antialias=1
Solid=0
X=160
Y=33
[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "#Color2#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "#Color1#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
========================================
; Time
========================================
[mHour]
Measure=Time
Format=%#I
MinValue=0
MaxValue=12
[mMinutes]
Measure=Time
Format=%M
MinValue=0
MaxValue=60
[mSecond]
Measure=Time
Format=%S
MinValue=0
MaxValue=60
[mDate]
Measure=Time
Format=%a %#d %b
[TimerBar]
Meter=RoundLine
MeasureName=mUptime
MeterStyle=sRoundBar
LineColor=#TimerColor#
LineWidth=5
Group=Controls | Timer
Hidden=1
X=37
Y=37
[HoursBar]
Meter=Roundline
MeasureName=mHour
MeterStyle=sRoundBar
LineColor=#HourColour#
X=r
Y=r
[MinutesBar]
Meter=Roundline
MeasureName=mMinutes
MeterStyle=sRoundBar
LineColor=#MinuteColour#
X=r
Y=r
[SecondsBar]
Meter=Roundline
MeasureName=mSecond
MeterStyle=sRoundBar
LineColor=#SecondsColour#
X=r
Y=r
[Value]
Meter=String
MeasureName=mHour
MeasureName2=mMinutes
MeterStyle=sAllText | sHighlight
Text=%1:%2#CRLF#[mDate]
X=115
Y=19
========================================
; CHIME
========================================
[sChime]
AntiAlias=1
X=30
Y=28
W=16
H=16
[mChimeHour]
Measure=Time
Format=%M
IfEqualValue=0
IfEqualAction=[Play #ChimeSound#]
[ChimeIcon]
Meter=Image
MeterStyle=sChime
ImageName=icon.png
ImageAlpha=150
============================================
; Enable/Disable Chime on Process Start/Stop
============================================
[mProcessDisableChime]
Measure=Calc
Formula=1
IfCondition=(mProcess1=1) || (mProcess2=1) || (mProcess3=1)
IfTrueAction=[!DisableMeasure mChimeHour][!SetOption ChimeIcon ImageTint ""][!UpdateMeter *][!Redraw]
IfFalseAction=[!EnableMeasure mChimeHour][!SetOption ChimeIcon ImageTint "128,255,0"][!UpdateMeter *][!Redraw]
[mProcess1]
Measure=Plugin
Plugin=Process
ProcessName=#Process1#
[mProcess2]
Measure=Plugin
Plugin=Process
ProcessName=#Process2#
[mProcess3]
Measure=Plugin
Plugin=Process
ProcessName=#Process3#
========================================
; Alarm
========================================
[mDigitPrefixerAlarm]
Measure=calc
Formula=00
Dynamicvariables=1
IfCondition=(#AlarmHourSet# >= 0) && (#AlarmHourSet# <= 9)
IfTrueAction=[!SetOption HourAlarm Prefix "0"]
IfFalseAction=[!SetOption HourAlarm Prefix ""]
IfCondition2=(#AlarmMinuteSet# >= 0) && (#AlarmMinuteSet# <= 9)
IfTrueAction2=[!SetOption MinuteAlarm Prefix "0"]
IfFalseAction2=[!SetOption MinuteAlarm Prefix ""]
Group=mALARM | ALARM
[mHourAlarm]
Measure=Time
Format=%H
Group=ALARM
[mMinuteAlarm]
Measure=Time
Format=%M
Group=ALARM
[Alarm]
Measure=calc
Formula=0
DynamicVariables=1
IfCondition=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#-10)
IfTrueAction=[!SetOption Action Text "#Message1#"][Play #Alarm#][!Redraw]
IfCondition2=(mHourAlarm = #AlarmHourSet#) && (mMinuteAlarm = #AlarmMinuteSet#)
IfTrueAction2=[!SetOption Action Text "#Message2#"][#Act#][!Redraw]
[HourAlarm]
Meter=String
MeasureName=mHour
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmHourSet#:
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#+1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmHourSet (Clamp(#AlarmHourSet#-1,0,23))] [!UpdateMeasureGroup mALARM] [!UpdateMeter HourAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=29
Y=30
[MinuteAlarm]
Meter=String
MeterStyle=sAllText | sHighlight
FontSize=9
Text=#AlarmMinuteSet#
DynamicVariables=1
MouseScrollUpAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#+1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
MouseScrollDownAction=[!SetVariable AlarmMinuteSet (Clamp(#AlarmMinuteSet#-1,0,59))] [!UpdateMeasureGroup mALARM] [!UpdateMeter MinuteAlarm] [!Redraw]
Group=AlarmSet
Hidden=1
X=-4R
Y=r
========================================
; Countdown
========================================
[mTime]
Group=TimerGroup
Measure=Time
Format=%H:%M %S
OnChangeAction=[!SetVariable Seconds (#Seconds#+#Direction#*(1-#Reset#))]
DynamicVariables=1
[mUptime]
Group=TimerGroup
Measure=Uptime
SecondsValue=#Seconds#
Format="%3!02i!:%2!02i! %1!02i!"
MaxValue=([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)
IfCondition=(#CURRENTSECTION#<=0) && (Sgn(#Direction#)=-1)
IfTrueAction=[!PauseMeasureGroup TimerGroup][#Act#][!SetOption Action Text "#Message2#"][Play "#Alarm#"][!Redraw]
IfCondition2=(#CURRENTSECTION#=600)
IfTrueAction2=[!SetOption Action Text "#Message1#"][Play "#Alarm#"][!Redraw]
IfConditionMode=1
DynamicVariables=1
[mClose]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=taskkill /IM #APP1#;taskkill /IM #APP2#;taskkill /IM #APP3#;taskkill /IM #APP4#;taskkill /IM #APP5#
[UptimeText]
Meter=String
MeasureName=mUptime
MeterStyle=sAllText
FontSize=14
Text=%1
InlineSetting=Size | 10
InlinePattern=^.*(\s.*)$
InlineSetting2=Weight | 800
InlinePattern2=^.*(\s.*)$
InlinePattern3=^$
InlineSetting3=Color | #Color2#
Group=Start | Timer
Hidden=1
X=115
Y=55
[Hours]
Meter=Image
SolidColor=0,0,0,1
MouseOverAction=[!SetOption UptimeText InlinePattern3 "^(\d{2})"][!UpdateMeter UptimeText][!Redraw]
MouseLeaveAction=[!SetOption UptimeText InlinePattern3 "^$"][!UpdateMeter UptimeText][!Redraw]
MouseScrollUpAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=99 ? 0 : [#DefaultHours]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultHours]=0 ? 99 : [#DefaultHours]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
DynamicVariables=1
Hidden=1
Group=Setters
H=25
W=25
X=-40r
Y=r
[Minutes]
Meter=Image
MeterStyle=Hours
MouseOverAction=[!SetOption UptimeText InlinePattern3 "^.*:(\d{2})"][!UpdateMeter UptimeText][!Redraw]
MouseLeaveAction=[!SetOption UptimeText InlinePattern3 "^$"][!UpdateMeter UptimeText][!Redraw]
MouseScrollUpAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultMinutes]=59 ? 0 : [#DefaultMinutes]+1)][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultMinutes]=0 ? 59 : [#DefaultMinutes]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
X=7R
[Seconds]
Meter=Image
MeterStyle=Hours
MouseOverAction=[!SetOption UptimeText InlinePattern3 "^.*\s(\d{2})"][!UpdateMeter UptimeText][!Redraw]
MouseLeaveAction=[!SetOption UptimeText InlinePattern3 "^$"][!UpdateMeter UptimeText][!Redraw]
MouseScrollUpAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultSeconds]=59 ? 0 : [#DefaultSeconds]+1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable Default[#CURRENTSECTION] "([#DefaultSeconds]=0 ? 59 : [#DefaultSeconds]-1)"][!SetVariable Seconds ([#DefaultSeconds]+[#DefaultMinutes]*60+[#DefaultHours]*3600)][!SetVariable Reset 1][!UnpauseMeasureGroup TimerGroup][!UpdateMeasureGroup TimerGroup][!PauseMeasureGroup TimerGroup][!SetVariable Reset 0][!UpdateMeter *][!Redraw]
H=22
X=4R
Y=50
========================================
; Controls
========================================
[sControls]
FontFace=Segoe MDL2 Assets
FontSize=12
StringAlign=CenterCenter
X=180
Y=16
[Play]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE768]
LeftMouseUpAction=[!UnpauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color3#"][!HideMeter Reset][!HideMeter Set][!ShowMeterGroup Timer][!Redraw]
Group=PlayPause | Start | Controls
[Pause]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE769]
LeftMouseUpAction=[!PauseMeasureGroup TimerGroup][!ToggleMeterGroup PlayPause][!SetOptionGroup Start FontColor "#Color1#"][!ShowMeter Reset][!ShowMeter Set][PlayStop "#Alarm#"][!Redraw]
Group=PlayPause | Start
Hidden=1
[Reset]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE72C]
FontSize=11
LeftMouseUpAction=[!Refresh]
Group=Controls
Y=20r
[Set]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE713]
FontSize=11
LeftMouseUpAction=[!HideMeterGroup Controls][!ShowMeterGroup Setters][!SetOptionGroup Button Hidden "0"] [!UpdateMeter *][!Redraw]
Group=Controls
Y=20r
[OK]
Meter=String
MeterStyle=sAllText | sControls | sHighlight
Text=[\xE73E]
FontSize=11
LeftMouseUpAction=[!ShowMeterGroup Controls][!HideMeterGroup Setters][!SetOptionGroup Button Hidden "1"] [!UpdateMeter *][!WriteKeyValue Variables DefaultSeconds [#DefaultSeconds]][!WriteKeyValue Variables DefaultMinutes [#DefaultMinutes]][!WriteKeyValue Variables DefaultHours [#DefaultHours]][!Redraw][!Refresh]
Group=Setters
Hidden=1
Y=r
========================================
; Buttons
========================================
[sButton]
Shape=Rectangle 0,0,10,10,50 | Extend FillAlpha | StrokeWidth 2 | Extend StrokeAlpha
FillAlpha=FillColor #StrokeColor0#
StrokeAlpha=StrokeColor 128,255,0,0
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "StrokeColor 255,255,0,255"] [!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha ""] [!UpdateMeter *] [!Redraw]
LeftMouseUpAction=[!SetOptionGroup Button FillAlpha "FillColor #StrokeColor0#"][!SetOption #CURRENTSECTION# FillAlpha "FillColor #Color2#"][!WriteKeyValue Variables Act [##CURRENTSECTION#]] [!WriteKeyValue Variables ActionText [#CURRENTSECTION]] [!UpdateMeter *][!Redraw]
ToolTipText=[#CURRENTSECTION]
DynamicVariables=1
Group=Button
Hidden=1
MouseActionCursor=0
UpdateDivider=-1
X=20r
Y=0r
[CloseApps]
Meter=Shape
MeterStyle=sButton
X=70
Y=10
[Hibernate]
Meter=Shape
MeterStyle=sButton
[Shutdown]
Meter=Shape
MeterStyle=sButton
[Lock]
Meter=Shape
MeterStyle=sButton
[Off]
Meter=Shape
MeterStyle=sButton
========================================
; Message
========================================
[Action]
Meter=String
MeterStyle=sAllText
FontSize=9
FontColor=255,228,110,255
Text=#ActionText#
Group=Controls | Timer
Hidden=1
X=115
Y=7