socks-the-fox / Chameleon

Chameleon plugin for Rainmeter
Other
50 stars 0 forks source link

Suggestion: Get the wallpaper file name only #12

Closed Cariboudjan closed 3 years ago

Cariboudjan commented 3 years ago

Edit:

Found a better solution. Just use:

[MeasureRegistry]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Control Panel\Desktop
RegValue=TranscodedImageCache
OnChangeAction=ENABLE THE CHAMELEON MEASURES
DynamicVariables=1

Gets the image information of the current wallpaper from the registry, and when that information changes, triggers the plugin. Reduces CPU use in the background.


I would love an option Type=DesktopFile for Chameleon that will only grab the file path/name of the current wallpaper, not all of its associated color information. This is because I use the above measure to do a check every 1 second to see if the wallpaper has changed, and if it has, it updates the color. The problem is that using Type=Desktop at a 1 second update is a relatively resource heavy process when all I actually need is the file name and whether or not it has changed. In some basic tests it makes difference of about 1% of my CPU.

If I had this option I could do:

socks-the-fox commented 3 years ago

Hey! Sorry it took so long to get back to you for this... I'm glad you found an alternative! I'm surprised to hear that Chameleon consumes more resources than your solution as that's basically what Chameleon does on it's own, where it won't actually refresh until the wallpaper path value it gets changes. I might look in to that, but for now I'm going to close this.