|
| 1 | +[Rainmeter] |
| 2 | +SkinWidth=#Skin.Width# |
| 3 | +SkinHeight=#Skin.Height# |
| 4 | +Update=#UpdateInterval# |
| 5 | +DefaultUpdateDivider=-1 |
| 6 | +AccurateText=1 |
| 7 | +OnRefreshAction=[!CommandMeasure Main.ActionTimer "Stop 1" "#RootConfig#"][!Move "#Skin.X#" "#Skin.Y#"][!Update] |
| 8 | +MouseLeaveAction=[!CommandMeasure Main.ActionTimer "Execute 1" "#RootConfig#"] |
| 9 | +MouseOverAction=[!CommandMeasure Main.ActionTimer "Stop 1" "#RootConfig#"] |
| 10 | +DefaultAlwaysOnTop=-2 |
| 11 | + |
| 12 | +[Variables] |
| 13 | +@IncludeVar=#@#variables.inc |
| 14 | +UpdateInterval=1000 |
| 15 | + |
| 16 | +; Dicatates popup size |
| 17 | +Skin.Width=(#Body.Element#*10) |
| 18 | +Skin.Height=(#Body.Element#*2+#Body.Padding#*2) |
| 19 | + |
| 20 | +; Do not change |
| 21 | +Parent.Position=1394 |
| 22 | +Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#))) |
| 23 | +Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#))) |
| 24 | + |
| 25 | +Format=0 |
| 26 | +Format0=%3!i! Hours %2!i! Minutes |
| 27 | +Format1=%4!i! Days %3!i! Hours %2!i! Minutes |
| 28 | + |
| 29 | +[Module.Battery.StyleInfoString] |
| 30 | +h=#Body.Element# |
| 31 | +InlineSetting=Face | #Font.Display# |
| 32 | +InlineSetting2=Size | #Font.DisplayS# |
| 33 | +InlineSetting3=Color | #Colour.2#,#Colour.2.Alpha# |
| 34 | +Postfix=[\x00A0] |
| 35 | +AntiAlias=1 |
| 36 | +DynamicVariables=1 |
| 37 | + |
| 38 | +[Module.Battery.StyleIconString] |
| 39 | +InlineSetting=Face | #Font.Icon# |
| 40 | +InlineSetting2=Size | #Font.IconS# |
| 41 | +InlineSetting3=Color | #Colour.2#,#Colour.2.Alpha# |
| 42 | +InlineSetting4=Color | 0,0,0,0 |
| 43 | +InlinePattern4=Highlight |
| 44 | +InlineSetting5=CharacterSpacing | 0 | (-#Font.IconS#) |
| 45 | +InlinePattern5=Highlight |
| 46 | +StringAlign=CenterCenter |
| 47 | +Prefix=Highlight |
| 48 | +AntiAlias=1 |
| 49 | +DynamicVariables=1 |
| 50 | + |
| 51 | +[Module.Battery.Uptime] |
| 52 | +Measure=Uptime |
| 53 | +Format=[#Format[#Format]] |
| 54 | +UpdateDivider=(5000/#UpdateInterval#) |
| 55 | +DynamicVariables=1 |
| 56 | +OnChangeAction=[!UpdateMeter Module.Battery.UptimeDisplay][!Redraw] |
| 57 | + |
| 58 | +; Cheers Khan |
| 59 | +[Module.Battery.PSRM] |
| 60 | +Measure=Plugin |
| 61 | +Plugin=PowershellRM |
| 62 | +Line=$b = Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorBrightness |
| 63 | +Line2=$m = Get-WmiObject -Namespace root/WMI -ClassName WmiMonitorBrightNessMethods |
| 64 | +Line3=function Set-Brightness { |
| 65 | +Line4=param([int] $brightness = 100) |
| 66 | +Line5=$m.WmiSetBrightness(0, $brightness) |
| 67 | +Line6=} |
| 68 | +Line7=return $b.CurrentBrightness |
| 69 | +UpdateDivider=(500/#UpdateInterval#) |
| 70 | +OnChangeAction=[!UpdateMeterGroup Module.Battery.BrightnessSlider][!Redraw] |
| 71 | + |
| 72 | +[Module.Battery.Background] |
| 73 | +Meter=Shape |
| 74 | +Shape=Rectangle 0,0,#Skin.Width#,#Skin.Height#,#Body.Corner# | StrokeWidth 0 | Fill Color #Colour.1#,#colour.1.Alpha# |
| 75 | + |
| 76 | +[Module.Battery.UptimeIcon] |
| 77 | +MeterStyle=Module.Battery.StyleIconString |
| 78 | +Meter=String |
| 79 | +x=(#Body.Padding#+#Body.Element#*0.5) |
| 80 | +y=(#Body.Padding#+#Body.Element#*0.5) |
| 81 | +w=#Body.Element# |
| 82 | +h=#Body.Element# |
| 83 | +Text=Time |
| 84 | +DynamicVariables=1 |
| 85 | +LeftMouseUpAction=[!UpdateMeter #CurrentSection#][!SetVariable Format "(#Format#=0?1:0)"][!UpdateMeter #CurrentSection#][!WriteKeyValue Variables Format "(#Format#=0?1:0)"][!UpdateMeasure Module.Battery.Uptime] |
| 86 | +MouseOverAction=[!SetOption "#CurrentSection#" "InlineSetting4" "Color | #*Colour.2*#,(#*Colour.2.Alpha*#*0.5)"][!UpdateMeter "#CurrentSection#"][!Redraw] |
| 87 | +MouseLeaveAction=[!SetOption "#CurrentSection#" "InlineSetting4" "Color | 0,0,0,0"][!UpdateMeter "#CurrentSection#"][!Redraw] |
| 88 | + |
| 89 | +[Module.Battery.UptimeDisplay] |
| 90 | +MeterStyle=Module.Battery.StyleInfoString |
| 91 | +Meter=String |
| 92 | +MeasureName=Module.Battery.Uptime |
| 93 | +x=(#Skin.Width#-#Body.Padding#) |
| 94 | +y=(#Body.Padding#+#Body.Element#*0.5) |
| 95 | +InlineSetting4=Weight | 900 |
| 96 | +InlinePattern4=\d |
| 97 | +StringAlign=RightCenter |
| 98 | + |
| 99 | +[Module.Battery.BrightnessIcon] |
| 100 | +MeterStyle=Module.Battery.StyleIconString |
| 101 | +Meter=String |
| 102 | +x=(#Body.Padding#+#Body.Element#*0.5) |
| 103 | +y=(#Body.Padding#+#Body.Element#*1.5) |
| 104 | +w=#Body.Element# |
| 105 | +h=#Body.Element# |
| 106 | +Text=Brightness |
| 107 | +LeftMouseUpAction=[!CommandMeasure Module.Battery.PSRM "Set-Brightness 40"][!UpdateMeasure Module.Battery.PSRM] |
| 108 | +MouseOverAction=[!SetOption "#CurrentSection#" "InlineSetting4" "Color | #*Colour.2*#,(#*Colour.2.Alpha*#*0.5)"][!UpdateMeter "#CurrentSection#"][!Redraw] |
| 109 | +MouseLeaveAction=[!SetOption "#CurrentSection#" "InlineSetting4" "Color | 0,0,0,0"][!UpdateMeter "#CurrentSection#"][!Redraw] |
| 110 | + |
| 111 | +[Module.Battery.StyleSliderShape] |
| 112 | +Group=Module.Battery.BrightnessSlider |
| 113 | +x=(-[#CurrentSection#:w]*1.5)r |
| 114 | +y=(#Body.Padding#+#Body.Element#*1.5) |
| 115 | +w=(#Body.Element#*0.4) |
| 116 | +h=(#Body.Element#*0.75) |
| 117 | +Shape=Rectangle (-[#CurrentSection#:w]),(-[#CurrentSection#:h]*0.5),[#CurrentSection#:w],[#CurrentSection#:h],2 | StrokeWidth 0 | Extend Extend |
| 118 | +Extend=Fill Color #Colour.2#,(#Colour.2.Alpha#*((#CurrentSection#*10<=[Module.Battery.PSRM])?1:0.25)) |
| 119 | +DynamicVariables=1 |
| 120 | +LeftMouseDownAction=[!CommandMeasure Module.Battery.PSRM "Set-Brightness (#CurrentSection#*10)"][!UpdateMeasure Module.Battery.PSRM] |
| 121 | + |
| 122 | +[10] |
| 123 | +MeterStyle=Module.Battery.StyleSliderShape |
| 124 | +Meter=Shape |
| 125 | +x=(#Skin.Width#-#Body.Padding#) |
| 126 | + |
| 127 | +[9] |
| 128 | +MeterStyle=Module.Battery.StyleSliderShape |
| 129 | +Meter=Shape |
| 130 | + |
| 131 | +[8] |
| 132 | +MeterStyle=Module.Battery.StyleSliderShape |
| 133 | +Meter=Shape |
| 134 | + |
| 135 | +[7] |
| 136 | +MeterStyle=Module.Battery.StyleSliderShape |
| 137 | +Meter=Shape |
| 138 | + |
| 139 | +[6] |
| 140 | +MeterStyle=Module.Battery.StyleSliderShape |
| 141 | +Meter=Shape |
| 142 | + |
| 143 | +[5] |
| 144 | +MeterStyle=Module.Battery.StyleSliderShape |
| 145 | +Meter=Shape |
| 146 | + |
| 147 | +[4] |
| 148 | +MeterStyle=Module.Battery.StyleSliderShape |
| 149 | +Meter=Shape |
| 150 | + |
| 151 | +[3] |
| 152 | +MeterStyle=Module.Battery.StyleSliderShape |
| 153 | +Meter=Shape |
| 154 | + |
| 155 | +[2] |
| 156 | +MeterStyle=Module.Battery.StyleSliderShape |
| 157 | +Meter=Shape |
| 158 | + |
| 159 | +[1] |
| 160 | +MeterStyle=Module.Battery.StyleSliderShape |
| 161 | +Meter=Shape |
0 commit comments