j.daddy wrote:I use this music visualizer skin called Fountains of Color and wanted to know if it is possible to edit the skin so that only it visualizes only when spotify is running. The extra cpu usage by the skin when playing games or rendering video through madvr is annoying. I have to exit rainmeter and start it again everytime. Any help would be much appreciated.
I'm not using Spotify (you also should take care how are you using it:
https://forum.rainmeter.net/viewtopic.php?p=131041#p131041).
So, although I know how this could be achieved, I can't test the following solution. Maybe you'll have to adapt it a bit.
So, the solution:
Showing / hiding the skin isn't enough, you have to load / unload it, to avoid the extra CPU usage.
For this you have to create a new skin, into a different config than the Fountain of Colors. So create a new skin (eg on the Skins tab of the Manage Rainmeter window, click the Create new skin button and name the newly created config FountainLoader, for example). If you clicked the New skin button, the newly created skin will open. Add the following code to this new skin:
Code: Select all
[Rainmeter]
Update=1000
[MeasureSpotify]
Measure=Plugin
Plugin=SpotifyPlugin
Type=Playing
IfCondition=(MeasureSpotify=1)
IfTrueAction=[!ActivateConfig "Fountain of Colors" "Fountain of Colors.ini"]
IfFalseAction=[!DeactivateConfig "Fountain of Colors"]
[SomeMeter]
Meter=STRING
See that the [MeasureSpotify] measure of this code, checks if the Spotify player is playing. If it does, the plugin measure returns 1 and in this case, because the IfCondition is met, the IfTrueAction is executed, so the Fountain of Colors is activated / loaded. When Spotify is stopped or paused, the IfCondition isn't met any more, so, according to the bang of the IfFalseAction option, the Fountain of Colors skin is deactivated / unloaded.
Keep in mind that when you're loading the skin of the above code, you won't see anything on the screen, because it has one single empty string meter, without a Text option (so it's invisible). However, the skin should work (I hope!), making its job.
Please let me know if this solution was good enough.