It is currently March 28th, 2024, 2:01 pm

A way to deactivate updates on hidden skins?

Get help with creating, editing & fixing problems with skins
DromaTheRyn
Posts: 9
Joined: March 11th, 2018, 7:47 pm

A way to deactivate updates on hidden skins?

Post by DromaTheRyn »

I'm working on a System Monitor that is quite minimalistic, but can be expanded to show a lot more. Is there a possibility to deactivate/ update the expanded skin really slowly? I added a UpdateDivider=-1 to everything, but have no idea how to update only when the skin is visible. Help would be really appreciated.
It's my first skin, so I've only got a few hours of experience.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Taskbar]
Meter=Image
SolidColor=15,15,15,255
W=1920
H=40
[CpuButton]
Meter=Button
SolidColor=15,15,15,0
W=330
H=40
LeftMouseUpAction=[!ToggleFadeGroup "Stats"] [!Update][!Redraw]
This TopBar.ini opens this CPU.ini:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
Group=Stats
StartHidden=1
OnRefreshAction=!RainmeterHide

[TransparentBackground]
Meter=IMAGE
SolidColor=15,15,15,140
W=330
H=150

Is there a way to do it more efficiently?
Also, how can I sync the updates up? There is some noticable delay between the skins. Code is a mess atm, would cleaning it up help with syncing?

Full code TopBar.ini:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1

[Taskbar]
Meter=Image
SolidColor=15,15,15,255
W=1920
H=40
[CpuButton]
Meter=Button
SolidColor=15,15,15,0
W=330
H=40
LeftMouseUpAction=[!ToggleFadeGroup "Stats"] [!Update][!Redraw]


[MeasureMaxTemp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x100007f
HWiNFOType=CurrentValue
;[MeasureCpuSpeed]
;Measure=Plugin
;Plugin=CoreTemp
;CoreTempType=CpuSpeed
[MeasureCurrentCPU]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000007
HWiNFOType=CurrentValue
;[MeterCpuSpeed]
;Meter=String
;MeasureName=MeasureCpuSpeed
;X=135
;Y=10
;W=200
;H=20
;FontColor=255,255,255,255
;Text="%1MHz"
;AntiAlias=1

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=5
Y=10
FontColor=255,255,255,255
Text="CPU: %1°C"
AntiAlias=1

[MeterCpuLoad]
Meter=String
MeasureName=MeasureCurrentCPU
X=95
Y=10
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
Full code CPU.ini:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
Group=Stats
StartHidden=1
OnRefreshAction=!RainmeterHide

[TransparentBackground]
Meter=IMAGE
SolidColor=15,15,15,140
W=330
H=150

;-------------
;---BACKEND---
;-------------

;---Temperatures---

[MeasureCore0Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000000
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore0TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000000
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore0TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000000
HWiNFOType=MaximumValue
UpdateDivider=-1
[MeasureCore1Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000001
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore1TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000001
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore1TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000001
HWiNFOType=MaximumValue
UpdateDivider=-1
[MeasureCore2Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000002
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore2TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000002
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore2TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000002
HWiNFOType=MaximumValue
UpdateDivider=-1
[MeasureCore3Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000003
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore3TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000003
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore3TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000003
HWiNFOType=MaximumValue
UpdateDivider=-1
[MeasureCore4Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000004
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore4TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000004
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore4TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000004
HWiNFOType=MaximumValue
UpdateDivider=-1
[MeasureCore5Temp]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000005
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore5TempMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000005
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCore5TempMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000400
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x1000005
HWiNFOType=MaximumValue
UpdateDivider=-1

;---Frequencies---

[MeasureCore0Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore1Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000001
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore2Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000002
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore3Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000003
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore4Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000004
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore5Speed]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000005
HWiNFOType=CurrentValue
UpdateDivider=-1

;---Loads---

[MeasureCore0Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000000
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore1Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000001
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore2Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000002
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore3Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000003
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore4Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000004
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCore5Load]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x7000005
HWiNFOType=CurrentValue
UpdateDivider=-1

;---Voltages---

[MeasureCpuVoltage]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf7067950
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x2000000
HWiNFOType=CurrentValue
UpdateDivider=-1
[MeasureCpuVoltageMin]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf7067950
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x2000000
HWiNFOType=MinimumValue
UpdateDivider=-1
[MeasureCpuVoltageMax]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=0xf7067950
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x2000000
HWiNFOType=MaximumValue
UpdateDivider=-1

;--------------
;---FRONTEND---
;--------------

[MeterCpuName]
Meter=String
X=5
Y=0
FontColor=255,255,255,255
Text="Intel Core i5 8600K"
AntiAlias=1
UpdateDivider=-1

[MeterArrangement1]
Meter=String
FontColor=255,255,255,255
Y=20
X=5
Text="Core #"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement2]
Meter=String
FontColor=255,255,255,255
Y=20
X=85
Text="Temperature"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement3]
Meter=String
FontColor=255,255,255,255
Y=35
X=55
Text="Current"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement4]
Meter=String
FontColor=255,255,255,255
Y=35
X=105
Text="Minimal"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement5]
Meter=String
FontColor=255,255,255,255
Y=35
X=155
Text="Maximal"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement6]
Meter=String
FontColor=255,255,255,255
Y=20
X=205
Text="Load"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement7]
Meter=String
FontColor=255,255,255,255
Y=20
X=255
Text="Frequency"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement8]
Meter=String
FontColor=255,255,255,255
Y=50
X=5
Text="Core 0"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement9]
Meter=String
FontColor=255,255,255,255
Y=65
X=5
Text="Core 1"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement10]
Meter=String
FontColor=255,255,255,255
Y=80
X=5
Text="Core 2"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement11]
Meter=String
FontColor=255,255,255,255
Y=95
X=5
Text="Core 3"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement12]
Meter=String
FontColor=255,255,255,255
Y=110
X=5
Text="Core 4"
AntiAlias=1
UpdateDivider=-1
[MeterArrangement13]
Meter=String
FontColor=255,255,255,255
Y=125
X=5
Text="Core 5"
AntiAlias=1
UpdateDivider=-1

;---Voltages---

[MeterCpuVoltage]
Meter=String
MeasureName=MeasureCpuVoltage
X=135
Y=0
FontColor=255,255,255,255
NumOfDecimals=3
Text="@%1v"
AntiAlias=1
UpdateDivider=-1
[MeterCpuVoltageMin]
Meter=String
MeasureName=MeasureCpuVoltageMin
X=205
Y=0
FontColor=255,255,255,255
NumOfDecimals=3
Text="[%1v-"
AntiAlias=1
UpdateDivider=-1
[MeterCpuVoltageMax]
Meter=String
MeasureName=MeasureCpuVoltageMax
X=255
Y=0
FontColor=255,255,255,255
NumOfDecimals=3
Text="%1v]"
AntiAlias=1
UpdateDivider=-1

;---Temperatures---

[MeterCore0Temp]
Meter=String
MeasureName=MeasureCore0Temp
X=55
Y=50
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore0TempMin]
Meter=String
MeasureName=MeasureCore0TempMin
X=105
Y=50
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore0TempMax]
Meter=String
MeasureName=MeasureCore0TempMax
X=155
Y=50
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore1Temp]
Meter=String
MeasureName=MeasureCore1Temp
X=55
Y=65
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore1TempMin]
Meter=String
MeasureName=MeasureCore1TempMin
X=105
Y=65
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore1TempMax]
Meter=String
MeasureName=MeasureCore1TempMax
X=155
Y=65
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore2Temp]
Meter=String
MeasureName=MeasureCore2Temp
X=55
Y=80
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore2TempMin]
Meter=String
MeasureName=MeasureCore2TempMin
X=105
Y=80
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore2TempMax]
Meter=String
MeasureName=MeasureCore2TempMax
X=155
Y=80
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore3Temp]
Meter=String
MeasureName=MeasureCore3Temp
X=55
Y=95
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore3TempMin]
Meter=String
MeasureName=MeasureCore3TempMin
X=105
Y=95
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore3TempMax]
Meter=String
MeasureName=MeasureCore3TempMax
X=155
Y=95
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore4Temp]
Meter=String
MeasureName=MeasureCore4Temp
X=55
Y=110
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore4TempMin]
Meter=String
MeasureName=MeasureCore4TempMin
X=105
Y=110
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore4TempMax]
Meter=String
MeasureName=MeasureCore4TempMax
X=155
Y=110
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore5Temp]
Meter=String
MeasureName=MeasureCore5Temp
X=55
Y=125
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore5TempMin]
Meter=String
MeasureName=MeasureCore5TempMin
X=105
Y=125
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1
[MeterCore5TempMax]
Meter=String
MeasureName=MeasureCore5TempMax
X=155
Y=125
FontColor=255,255,255,255
Text="%1°C"
AntiAlias=1
UpdateDivider=-1

;---Loads---

[MeterCore0Load]
Meter=String
MeasureName=MeasureCore0Load
X=205
Y=50
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1
[MeterCore1Load]
Meter=String
MeasureName=MeasureCore1Load
X=205
Y=65
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1
[MeterCore2Load]
Meter=String
MeasureName=MeasureCore2Load
X=205
Y=80
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1
[MeterCore3Load]
Meter=String
MeasureName=MeasureCore3Load
X=205
Y=95
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1
[MeterCore4Load]
Meter=String
MeasureName=MeasureCore4Load
X=205
Y=110
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1
[MeterCore5Load]
Meter=String
MeasureName=MeasureCore5Load
X=205
Y=125
FontColor=255,255,255,255
Text="%1%"
AntiAlias=1
UpdateDivider=-1

;---Frequencies---

[MeterCore0Speed]
Meter=String
MeasureName=MeasureCore0Speed
X=255
Y=50
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
[MeterCore1Speed]
Meter=String
MeasureName=MeasureCore1Speed
X=255
Y=65
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
[MeterCore2Speed]
Meter=String
MeasureName=MeasureCore2Speed
X=255
Y=80
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
[MeterCore3Speed]
Meter=String
MeasureName=MeasureCore3Speed
X=255
Y=95
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
[MeterCore4Speed]
Meter=String
MeasureName=MeasureCore4Speed
X=255
Y=110
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
[MeterCore5Speed]
Meter=String
MeasureName=MeasureCore5Speed
X=255
Y=125
FontColor=255,255,255,255
Text="%1MHz"
AntiAlias=1
UpdateDivider=-1
Thanks in advance!
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A way to deactivate updates on hidden skins?

Post by balala »

DromaTheRyn wrote:I'm working on a System Monitor that is quite minimalistic, but can be expanded to show a lot more. Is there a possibility to deactivate/ update the expanded skin really slowly? I added a UpdateDivider=-1 to everything, but have no idea how to update only when the skin is visible. Help would be really appreciated.
Let's start with this first question, for first.
How do you expand the skin? I mean you have for example the minimalistic look. What you do to expand it to show everything?
Because the following possibility could be good: first add a variable in the [Variables] section. Let's name it Show:

Code: Select all

[Variables]
Show=0
The meaning of this variable would be that it controls how and what is visible in the skin: when it is 0, just the minimalistic skin is visible. When you set it to 1, everything become visible.
Now you have to add a string / Image / Button meter, to can set the value of the Show variable according to your needs. Let's use a String meter, but obviously you can use which one you like more:

Code: Select all

[MeterShow]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Set visibility
DynamicVariables=1
LeftMouseUpAction=[!SetVariable Show "(1-#Show#)"][!UpdateMeasure "MeasureShow"][!UpdateMeter "#CURRENTSECTION#"]
Now you need a Calc measure which sets the UpdateDivider option to each meter / measure, depending on the value of the Show variable AND hides / shows the meters which must be hidden in the minimalistic state of the skin and must be shown otherwise:

Code: Select all

[MeasureShow]
Measure=Calc
Formula=#Show#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeasureName UpdateDivider "1"][!SetOption MeterName UpdateDivider "1"][!HideMeterGroup "NotMinimalisticStyle"][!Redraw]
IfFalseAction=[!SetOption MeasureName UpdateDivider "-1"][!SetOption MeterName UpdateDivider "-1"][!ShowMeterGroup "NotMinimalisticStyle"][!Redraw]
DynamicVariables=1
Take care the followings:
  • The name of this measure should have to be that used in the !UpdateMeasure bang of the LeftMouseUpAction option of the [MeterShow] meter.
  • In either the IfTrueAction and the IfFalseAction options above you have to multiply the two !SetOption bangs, adding each of them so many times, as many measures / meters you have and add the appropriate names to each of them. This way the bangs will modify the UpdateDivider options of each section. This options are set to 1 when the minimalistic state is in use (updating each of them in every update cycle) and to -1 (the measures / meters aren't updated in this case) otherwise.
  • With the above values, when the Show variable is set to 0, the meters belonging to the NotMinimalisticStyle group are hidden, when it is set to 1 (well, in fact to any greater value then 0 - but at least if you don't enter manually a value, 1 is the only non 0 possible value), the same meters are shown. Don't forget to add the Group=NotMinimalisticStyle option to each meters which have to be hidden accordingly.
  • This procedure don't change the Update value of the whole skin, but this isn't even possible. The content of the [Rainmeter] section can't be changed dynamically. This is what you should have to do to change the Update value. But changing the UpdateDivider value of each section of the skin, is practically the same thing.
This is very comfortable procedure to dynamically control things in your skin, depending on the value of a variable, which can be easily modified.
DromaTheRyn
Posts: 9
Joined: March 11th, 2018, 7:47 pm

Re: A way to deactivate updates on hidden skins?

Post by DromaTheRyn »

Thanks for the fast reply!
That was just a tad too fast for me though (language barrier plays a little role there too).
With "expand" I mean that I open a second skin (.ini, that is a skin, right?).
Do I put that all into one .ini file? Or do I put the variable into all skins (also downloadet ones) and use the rest of the code you provided as a controller?
What I want to achieve is basically a kill switch, which toggles all my skins to be visible + active or invisible and inactive (less CPU load (or even memory use?)) Plus the TopBar to toggle the expanded hardware monitor.
I could provide some images tomorrow to clear up what I wanted to express.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A way to deactivate updates on hidden skins?

Post by balala »

DromaTheRyn wrote:(.ini, that is a skin, right?).
Right.
DromaTheRyn wrote:With "expand" I mean that I open a second skin
In this case we have to rewrite a few things in the code. I thought you have a skin with relatively few visible things and when you expand it, you want to make visible the others, initially not visible things, too.
However doesn't matter too much. You have to replace the IfTrueAction and IfFalseAction options of the [MeasureShow] measure, as it follows:

Code: Select all

[MeasureShow]
...
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!DeactivateConfig "ExpandConfig"]
IfFalseAction=[!ActivateConfig "ExpandConfig" "SkinName.ini"]
...
Take care that the !ActivateConfig bang, unlike !DeactivateConfig, has one more parameter: the name of the skin. ExpandConfig is the name of the config which contains the SkinName.ini skin file.
Just to be easier, ExpandConfig is the path of the folder which contains the SkinName.ini file, starting from the Skins folder (eg: if you want to open the Skins\[color=#008080]illustro\Network[/color]\Network.ini skin file, the config is illustro\Network).
Details about the configs: https://docs.rainmeter.net/manual/skins/#Config
DromaTheRyn wrote:Do I put that all into one .ini file?
No, at all. Even more if you have both .ini files in the same folder (config), you can't open both simultaneously, just one at a time. If you want to can open both in the same time, you have to put them in different folders.
DromaTheRyn wrote:Or do I put the variable into all skins (also downloadet ones) and use the rest of the code you provided as a controller?
If more skins are using the same variables, it's not a good idea to put all variables in all skins. Instead you should have to create a .inc file (let's name it Settings.inc) (usually) into the @Resources folder, then include this file into each skin which have to use the variables. You can do this adding the @Include=#@#Settings.inc option, under the [Variables] section of your skin(s). Even in more then one single skin.
DromaTheRyn wrote:What I want to achieve is basically a kill switch, which toggles all my skins to be visible + active or invisible and inactive (less CPU load (or even memory use?)) Plus the TopBar to toggle the expanded hardware monitor.
Take care that active / inactive, respectively visible / invisible, are not the same things. An active (loaded) skin is loaded and can be visible or hidden. An inactive (not loaded) skin isn't nor visible, not being loaded. It's like a closed app.
DromaTheRyn wrote:I could provide some images tomorrow to clear up what I wanted to express.
This would be very great. Please do so.
DromaTheRyn
Posts: 9
Joined: March 11th, 2018, 7:47 pm

Re: A way to deactivate updates on hidden skins?

Post by DromaTheRyn »

Thanks for the answer, included a lot of things I did not know.
Down below are 2 images (hopefully ^^).
But with what you explained, I could slow down the update rate on hidden skins (and switch back to normal when visible), which draws less CPU power, however since the skins are loaded, won't reduce RAM usage, right?
The skin obviously isn't finished yet, but once I get the hang of it, I'll complete it.
Question on the side: In Windows 10 task manager, in background processes, Rainmeter is shown. The CPU and RAM usage is for all skins running?

Desktop: https://imgur.com/a/7dHbd
Blue arrow: CPU.ini (...\Documents\Rainmeter\Skins\TopBar\PerformanceTab)
Red arrow: TopBar.ini (...\Documents\Rainmeter\Skins\TopBar\TopBar.ini)
Green arrow: visualizer.ini (\Documents\Rainmeter\Skins\Visualizer\visualizer.ini)
from: https://github.com/MarcoPixel/Lano-Visualizer
White arrow: eSwitch.ini (...\Documents\Rainmeter\Skins\eSwitch v2\eSwitch.ini)
from: https://esnooze.deviantart.com/art/eSwitch-2-0-408169734

Rainmeter file tree: https://imgur.com/a/TjBl2
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A way to deactivate updates on hidden skins?

Post by balala »

Ok, please pack and upload your config, containing the two skins.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A way to deactivate updates on hidden skins?

Post by balala »

Adding in the code the UpdateDivider=-1 option is perfectly ok, however I'd make this a bit different way. I'd remove all those UpdateDivider=-1 options and would either:
  • Add a DefaultUpdateDivider=-1 option to the [Rainmeter] section of the CPU.ini skin. With this option added, the UpdateDivider=-1 option is set to each measure and meter of the skin.
  • Or even better, I'd set the Update value of the skin to -1 (Update=-1).
However I don't think in this case not updating the skin, would be a good idea. I'd recommend better to update it with the default period: Update=1000.
DromaTheRyn
Posts: 9
Joined: March 11th, 2018, 7:47 pm

Re: A way to deactivate updates on hidden skins?

Post by DromaTheRyn »

Even when hidden?
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A way to deactivate updates on hidden skins?

Post by balala »

DromaTheRyn wrote:Even when hidden?
I'm sorry, even when hidden, what?
Post Reply