It is currently April 25th, 2024, 11:53 am
A way to deactivate updates on hidden skins?
-
- Posts: 9
- Joined: March 11th, 2018, 7:47 pm
Re: A way to deactivate updates on hidden skins?
Should I even update the skin with the standard update rate even when hidden?
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: A way to deactivate updates on hidden skins?
That's why I say that first you should have to decide if you want to just hide the second skin, or want to unload it. In first case, the skin indeed can be set to not update at all, but if instead of hiding, you unload it, then there is no need to change its update, because an unload skin, doesn't uses resources at all. At least now, this second possibility seem better for me.DromaTheRyn wrote:Should I even update the skin with the standard update rate even when hidden?
-
- Posts: 9
- Joined: March 11th, 2018, 7:47 pm
Re: A way to deactivate updates on hidden skins?
Is there a way to load/ unload the skin upon pressing the button in the top bar?
If so, what would be the most elegant way?
If so, what would be the most elegant way?
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: A way to deactivate updates on hidden skins?
Take this as a suggestion on how to use your skins:DromaTheRyn wrote:Should I even update the skin with the standard update rate even when hidden?
- if your skin is used to display graphics or other informations, which changes, more or less constantly, you must run it, even if it's hidden, if you unload it or you stop his updating, you'll lose all the informations when hidden/unloaded.
- if your skin is a launcher or something that is static and doesn't change, you can set it to Update=-1.
You can also reduce the resources used simply adding UpdateDivider=-1 to anything static (images, buttons, background and so on) and leave the update only for measures and meters that are changing often.
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: A way to deactivate updates on hidden skins?
If despite fonpaolo's suggestion, you still decide to load / unload the appropriate skin, there is. First add the following variable to the [Variable] section of your skin (create this section, because I think it's not yet created):DromaTheRyn wrote:Is there a way to load/ unload the skin upon pressing the button in the top bar?
If so, what would be the most elegant way?
Code: Select all
[Variables]
Show=0
Code: Select all
[MeterButton]
Meter=STRING
X=(#CURRENTCONFIGWIDTH#-160)
Y=(#CURRENTCONFIGHEIGHT#/2)
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CenterCenter
AntiAlias=1
LeftMouseUpaction=[!setVariable Show (1-#Show#)][!UpdateMeasure "MeasureShow"]
DynamicVariables=1
Now modify a bit the [MeasureShow] Calc measure and add it to your code:
Code: Select all
[MeasureShow]
Measure=Calc
Formula=#Show#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterButton Text "Load"][!DeactivateConfig "TopBar\PerformanceTab"][!UpdateMeter "MeterButton"][!Redraw]
IfFalseAction=[!SetOption MeterButton Text "Unload"][!ActivateConfig "TopBar\PerformanceTab" "CPU.ini"][!UpdateMeter "MeterButton"][!Redraw]
DynamicVariables=1
-
- Posts: 9
- Joined: March 11th, 2018, 7:47 pm
Re: A way to deactivate updates on hidden skins?
Thanks for all the answers. Didn't have time in the last few weeks, but now I'm ready to continue. I think I'll try the normal refresh one first. Is there a way to sync up the TopBar.ini and CPU.ini? Right now, there is around 200ms delay.
-
- Moderator
- Posts: 1387
- Joined: April 11th, 2013, 8:08 pm
- Location: Italy
Re: A way to deactivate updates on hidden skins?
If what you noticed is a small visual delay between each skin, when normally updated, keep in mind that every time Rainmeter updates the skins (considering the usual Update=1000), this means that the program in this second has to read all the measures of all the loaded skins, reload, change images (when needed) and redraw everything.
It can't be executed everything at once, but there's a small delay from skin to skin.
It can't be executed everything at once, but there's a small delay from skin to skin.