-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDI_Volume.ini
86 lines (83 loc) · 2.68 KB
/
DI_Volume.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[Metadata]
Name=Dynamic Island - Volume
Author=KrazyManJ
Information=iOs like dynamic island!
License=MIT License
Version=1.0.0
[Rainmeter]
@Include=#@#Setup.inc
; OnRefreshAction=[!CommandMeasure "MeasureWin7Audio" "ToggleMute"]
; OnRefreshAction=[!UnpauseMeasure Transition] ;Open on start (Debug)
;
; ======================================================================================
; VARIABLES
; ======================================================================================
;
[Variables]
C_CLOSED_W=300
C_CLOSED_H=70
C_OPENED_W=600
C_OPENED_H=70
C_PREV_TYPE="DI_Shutdown.ini"
C_NEXT_TYPE="DI_Battery.ini"
V_ICON_BG_COLOR=0,0,0,0
V_FONT_COLOR=255,255,255
;
; ======================================================================================
; STATE LABEL
; ======================================================================================
;
[M_Audio]
Measure=Plugin
Plugin=Win7AudioPlugin
[M_State]
Measure=Calc
Formula=([M_Audio:] = -1 ? 0 : 1)
DynamicVariables=1
Substitute="0":"Silent","1":"Volume: [M_Audio:]%"
[M_FontChecker]
Measure=Calc
IfCondition=[M_Audio:]=-1
IfTrueAction=[!SetVariable V_FONT_COLOR 255,59,48]
IfFalseAction=[!SetVariable V_FONT_COLOR 255,255,255]
DynamicVariables=1
[StateLabel]
Meter=String
MeasureName=M_State
FontFace=#FONTFACE#
X=(#V_CUR_X#+#V_CUR_W#-30)
Y=(#V_CUR_Y#+#V_CUR_H#/2)
DynamicVariables=1
AntiAlias=1
FontSize=20
FontColor=#V_FONT_COLOR#,[F_ByteTransition]
StringAlign=RightCenter
;
; ======================================================================================
; ICON
; ======================================================================================
;
[M_BackgroundChecker]
Measure=Calc
IfCondition=[M_Audio:]=-1
IfTrueAction=[!SetVariable V_ICON_BG_COLOR 255,59,48,255]
IfFalseAction=[!SetVariable V_ICON_BG_COLOR 0,0,0,0]
DynamicVariables=1
[IconBackground]
Meter=Shape
Shape=Rectangle (#V_CUR_X#+10),(#V_CUR_Y#+10),80,50,25 | Fill Color #V_ICON_BG_COLOR# | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure M_Audio "ToggleMute"]
[M_IconState]
Measure=Calc
Formula=([M_Audio:]=-1 ? 0 : ([M_Audio:]<50 ? 1 : 2))
DynamicVariables=1
Substitute="0":"Silent","1":"Low","2":"High"
[Icon]
Meter=Image
ImageName=#@#Images/Volume/[M_IconState].png
X=(#V_CUR_X#+30)
Y=(#V_CUR_Y#+15)
W=40
H=40
DynamicVariables=1