Code: Select all
[Rainmeter]
Update=50
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
;MouseOverAction=[!ShowMeterGroup Menu]
;MouseLeaveAction=[!HideMeterGroup Menu]
OnRefreshAction=[!ShowMeter Action1][!DisableMeasure mTimer4]
AccurateText=1
[Metadata]
Name=Countdown Timer
Author=zzeneg & balala, Yincognito, eclectic tech, death crafter, jsmorley
Version=2021.7.31
[Bg]
Meter=Shape
Shape=Rectangle Rectangle 1,1,150,60,5 | Extend StrokeSize | Stroke Color 128,255,0,100 | Fill Color 0,0,0,120
StrokeSize=StrokeWidth 0
MouseOverAction=[!SetOption #CURRENTSECTION# StrokeSize "StrokeWidth 2"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeSize "StrokeWidth 0"][!UpdateMeter *][!Redraw]
StrokeAlpha=Stroke Color 128,255,0,100
DynamicVariables=1
[Variables]
Alarm=Alarm.wav
DefaultTime=100
MaxVal=#DefaultTime#
;DefaultTime is the time (6000=10mins in one-tenth of seconds!) which appears when you refresh the skin.
CloseApps=[!CommandMeasure mClose "Run"]
APP1=Dolphin.exe
APP2=pcsx2.exe
APP3=rpcs3.exe
APP4=retroarch.exe
APP5=
Hibernate=rundll32.exe powrprof.dll,SetSuspendState
Shutdown=shutdown.exe -s -t 60 -f
HybridShutdown=shutdown.exe /s /hybrid /f /t 60
Restart=shutdown.exe -r -t 0
Lock=rundll32.exe user32.dll, LockWorkStation
Act=#CloseApps#
========================================
; STYLES
========================================
[sAllText]
FontFace=Aller
StringStyle=Bold
StringAlign=Center
FontSize=9
FontColor=255,255,255,200
StringEffect=Shadow
FontEffectColor=0,0,0,150
AntiAlias=1
[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "128,255,0"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
[mClose]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=taskkill /IM #APP1#;taskkill /IM #APP2#;taskkill /IM #APP3#;taskkill /IM #APP4#;taskkill /IM #APP5#
[MeterOne]
Meter=String
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Close Apps
LeftMouseUpAction=[!CommandMeasure mClose "Run"]
Y=60
========================================
; MEASURES
========================================
[mTime]
Measure=Time
[mCounterTimer]
Measure=Calc
Formula=(( mCounterTimer = 0 ) ? ( mTime - mTimer / 10 ) : mCounterTimer )
Disabled=1
[mTimer]
Measure=Calc
Formula=(( mCounterTimer = 0 ) ? mTimer : ( mTime - mCounterTimer ) * 10 )
[mSp]
Measure=Calc
Formula=(( mSp + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mSp]
[mSm]
Measure=Calc
Formula=(( mSm + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mSm]
[mMp]
Measure=Calc
Formula=(( mMp + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mMp]
[mMm]
Measure=Calc
Formula=(( mMm + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mMm]
[mHp]
Measure=Calc
Formula=(( mHp + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mHp]
[mHm]
Measure=Calc
Formula=(( mHm + 1 ) % 2 )
Disabled=1
IfAboveValue=0
IfAboveAction=[!DisableMeasure mHm]
[mTimerSet]
Measure=Calc
Formula=((( mTimerSet + 10 * mSp - 10 * mSm + 600 * mMp - 600 * mMm + 36000 * mHp - 36000 * mHm + #DefaultTime# ) < 0 ) ? ( #DefaultTime# * ( -1 )) : ( mTimerSet + 10 * mSp - 10 * mSm + 600 * mMp - 600 * mMm + 36000 * mHp - 36000 * mHm ))
OnChangeAction=[!SetVariable MaxVal (#DefaultTime#-[mTimer:]+[mTimerSet:])]
DynamicVariables=1
[mTimer2]
Measure=Calc
Format=%S
Formula=( #DefaultTime# - mTimer + mTimerSet )
IfBelowValue=1
IfBelowAction=[!DisableMeasure mCounterTimer]
MinValue=0
MaxValue=#MaxVal#
DynamicVariables=1
[mTimer3]
Measure=Calc
Formula=(( mCounterTimer = 0 ) ? 1 : ( mTimer2 - 1 ))
IfBelowValue=0
IfBelowAction=[!DisableMeasure mCounterTimer][#Act#][!HideMeter Stop][!HideMeter Start][!ShowMeter Reset]
DynamicVariables=1
[mTimer4]
Measure=Calc
Formula=(( mCounterTimer = 0 ) ? 1 : ( mTimer2 - 1 ))
IfBelowValue=0
IfBelowAction=[PLAY #Alarm#][!HideMeter Stop][!HideMeter Start][!ShowMeter Reset]
DynamicVariables=1
[mTimerHours]
Measure=Calc
Formula=(( FLOOR ( mTimer2 / 36000 )) % 100 )
RegExpSubstitute=1
Substitute="^(.*)$":"0\1","^.*(.{2})$":"\1"
[mTimerMinutes]
Measure=Calc
Formula=(( FLOOR ( mTimer2 / 600 )) % 60 )
RegExpSubstitute=1
Substitute="^(.*)$":"0\1","^.*(.{2})$":"\1"
[mTimerSeconds]
Measure=Calc
Formula=(( FLOOR ( mTimer2 / 10 )) % 60 )
RegExpSubstitute=1
Substitute="^(.*)$":"0\1","^.*(.{2})$":"\1"
========================================
; METERS
========================================
[sTimerDisplay]
FontSize=16
Group=TimerDisplay
[TimerDisplayHr]
Meter=String
MeterStyle=sAllText | sTimerDisplay
MeasureName=mTimerHours
Text=%1:
MouseScrollUpAction=
MouseScrollDownAction=
X=40
Y=20
[TimerDisplayMin]
Meter=String
MeterStyle=sAllText | sTimerDisplay
MeasureName=mTimerMinutes
Text=%1
MouseScrollUpAction=
MouseScrollDownAction=
X=28r
Y=r
[TimerDisplaySec]
Meter=String
MeterStyle=sAllText | sTimerDisplay
MeasureName=mTimerSeconds
FontSize=10
Text=%1
InlineSetting=Size | 10
InlinePattern=.+( .+)
;MouseScrollUpAction=[!EnableMeasure mSp] [!Redraw]
;MouseScrollDownAction=[!EnableMeasure mSm] [!Redraw]
X=26r
Y=9r
========================================
; Actions
========================================
[sAction]
StringAlign=Left
FontColor=255,255,255,200
Hidden=1
Group=Action
X=r
Y=r
[Action1]
Meter=String
MeterStyle=sAllText | sAction
Text=Close Apps
X=10
Y=6
[Action2]
Meter=String
MeterStyle=sAllText | sAction
Text=Hibernate
[Action3]
Meter=String
MeterStyle=sAllText | sAction
Text=Shutdown
[Action4]
Meter=String
MeterStyle=sAllText | sAction
Text=Hybrid S/d
[Action5]
Meter=String
MeterStyle=sAllText | sAction
Text=Restart
[Action6]
Meter=String
MeterStyle=sAllText | sAction
Text=Lock
========================================
; Controls
========================================
[sControls]
Group=Controls
Y=45
[Start]
Meter=String
MeterStyle=sAllText | sHighlight | sControls
Text=Start
LeftMouseDownAction=[!EnableMeasure mCounterTimer][!HideMeter Start][!ShowMeter Stop][!HideMeter Reset][!HideMeter Set][!SetOptionGroup TimerDisplay FontColor "255,255,0"]
X=25
[Stop]
Meter=String
MeterStyle=sAllText | sHighlight | sControls
Text=Stop
LeftMouseDownAction=[!DisableMeasure mCounterTimer][!HideMeter Stop][!ShowMeter Start][!ShowMeter Reset][!ShowMeter Set][!SetOptionGroup TimerDisplay FontColor ""]
Hidden=1
X=25
[Reset]
Meter=String
MeterStyle=sAllText | sHighlight | sControls
Text=Reset
LeftMouseDownAction=[!DisableMeasure mTimer]
LeftMouseUpAction=[!EnableMeasure mTimer][!ShowMeter Start][!ShowMeter Set][!HideMeter Reset][PlayStop "#Alarm#"]
Hidden=1
X=71
[Set]
Meter=String
MeterStyle=sAllText | sHighlight | sControls
Text=Set
LeftMouseUpAction=[!HideMeterGroup Controls][!ShowMeterGroup SetTimer] [!SetOption Action1 LeftMouseDownAction """ [!ShowMeter Action2][!HideMeter Action1][!SetVariable Act "#CloseApps#"][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""] [!SetOption Action2 LeftMouseDownAction """ [!ShowMeter Action3][!HideMeter Action2][!SetVariable Act "#Shutdown#"][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""] [!SetOption Action3 LeftMouseDownAction """ [!ShowMeter Action4][!HideMeter Action3][!SetVariable Act "#HybridShutdown#"][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""] [!SetOption Action4 LeftMouseDownAction """ [!ShowMeter Action5][!HideMeter Action4][!SetVariable Act "#Restart#"][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""] [!SetOption Action5 LeftMouseDownAction """ [!ShowMeter Action6][!HideMeter Action5][!SetVariable Act "#Lock#"][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""] [!SetOption Action6 LeftMouseDownAction """ [!ShowMeter Action1][!HideMeter Action6][!EnableMeasure mTimer3][!EnableMeasure mTimer4]"""][!DisableMeasure mCounterTimer] [!SetOptionGroup TimerDisplay MeterStyle "sAllText | sHighlight | sTimerDisplay"][!SetOptionGroup Action MeterStyle "sAllText | sHighlight | sAction"] [!SetOption TimerDisplayHr MouseScrollUpAction """ [!EnableMeasure mHp]"""] [!SetOption TimerDisplayHr MouseScrollDownAction """ [!EnableMeasure mHm]"""] [!SetOption TimerDisplayMin MouseScrollUpAction """ [!EnableMeasure mMp]"""] [!SetOption TimerDisplayMin MouseScrollDownAction """ [!EnableMeasure mMm]"""]
X=118
[OK]
Meter=String
MeterStyle=sAllText | sHighlight | sSetting
Text=OK
LeftMouseupAction=[!HideMeterGroup SetTimer][!ShowMeterGroup Controls] [!HideMeter Reset][!ShowMeter Start][!HideMeter Stop] [!SetOptionGroup Action LeftMouseDownAction ""][!SetOptionGroup TimerDisplay MouseScrollUpAction ""][!SetOptionGroup TimerDisplay MouseScrollDownAction ""] [!SetOptionGroup TimerDisplay MeterStyle "sAllText | sTimerDisplay"] [!SetOptionGroup Action MeterStyle "sAllText | sAction"]
Hidden=1
Group=SetTimer
X=118
Y=45
========================================
; Round Bar
========================================
[sRoundBar]
LineStart=12
LineLength=16
StartAngle=(Rad(270))
RotationAngle=6.2831853
Antialias=1
Solid=1
X=130
Y=20
[RoundBarBack]
Meter=RoundLine
MeterStyle=sRoundBar
LineColor=255,255,255,20
[RoundBarFore]
Meter=RoundLine
MeasureName=mTimer2
MeterStyle=sRoundBar
LineColor=100,100,200
LineWidth=4
Solid=0
========================================
; Menu
========================================
;[Menu]
;Meter=IMAGE
;ImageName=;MenuXR.png
;Hidden=1
;Group=Menu
;X=127
;Y=0
;
;[Close]
;Meter=Shape
;Shape=Rectangle 127,0,20,20,15 | FillColor 200,100,100 | StrokeWidth 2 | Extend StrokeAlpha
;StrokeAlpha=Stroke Color 128,255,0,100
;LeftMouseupAction=!DeactivateConfig
;MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 0,255,255,255"] [!UpdateMeter *][!Redraw]
;MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 128,255,0,100"] [!UpdateMeter *] [!Redraw]
;DynamicVariables=1
;Hidden=1
;Group=Menu
;
;[More]
;Meter=Shape
;Shape=Rectangle 127,21,20,20,15 | FillColor 100,100,200 | StrokeWidth 2 | Extend StrokeAlpha
;StrokeAlpha=Stroke Color 128,255,0,100
;LeftMouseupAction=!ActivateConfig "#CURRENTCONFIG#" "Stopwatch.ini"
;MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 0,255,255,255"] [!UpdateMeter *][!Redraw]
;MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color 128,255,0,100"] [!UpdateMeter *] [!Redraw]
;DynamicVariables=1
;Hidden=1
;Group=Menu