It is currently April 28th, 2024, 5:28 pm

Advanced wallpaper changing

Report bugs with the Rainmeter application and suggest features.
vlatro
Posts: 1
Joined: April 17th, 2010, 7:22 pm

Advanced wallpaper changing

Post by vlatro »

Here's my vision:

I have some time lapse photos of a nature scene I use as wallpaper. If I could change wallpaper based on variables rainmeter already tracks, I could set up a very elegant and functional desktop.
For instance, if it's Noon, the image changes to a photo taken at noon, with the sun in it's corresponding position, the scene lighting relative to the time of day. If it's raining, I can see the same scene, but with rain. At night, the scene dims, the moon is waxing or wanning depending on the calendar date. If it's winter, the snow scene is used, fall the trees have gold leaves, summer is bright, spring shows the trees budding out etc.

Rather than overlaying data on a static wallpaper, the wallpaper would actually contain the info we want it to convey, freeing up a lot of room on the screen. This could all be accomplished with something as simple as a SetWallpaper=%Path% function and basic If/Else statements. I've actually considered writing a standalone program for this, but it seems to cover a lot of ground already well managed by rainmeter. Any thoughts, ideas, suggestions?
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Advanced wallpaper changing

Post by jsmorley »

vlatro wrote:Here's my vision:

I have some time lapse photos of a nature scene I use as wallpaper. If I could change wallpaper based on variables rainmeter already tracks, I could set up a very elegant and functional desktop.
For instance, if it's Noon, the image changes to a photo taken at noon, with the sun in it's corresponding position, the scene lighting relative to the time of day. If it's raining, I can see the same scene, but with rain. At night, the scene dims, the moon is waxing or wanning depending on the calendar date. If it's winter, the snow scene is used, fall the trees have gold leaves, summer is bright, spring shows the trees budding out etc.

Rather than overlaying data on a static wallpaper, the wallpaper would actually contain the info we want it to convey, freeing up a lot of room on the screen. This could all be accomplished with something as simple as a SetWallpaper=%Path% function and basic If/Else statements. I've actually considered writing a standalone program for this, but it seems to cover a lot of ground already well managed by rainmeter. Any thoughts, ideas, suggestions?
You will need some kind of external program to actually set the wallpaper. You can use Rainmeter to do all kinds of clever stuff to pick a wallpaper based on measures like time or weather etc, then pass the name of the wallpaper to the external program in an !Execute bang, but Rainmeter can't do the actual interaction with Windows to set the wallpaper.

Hint:

One way would be to actually set up "themes" in RainThemes with a different wallpaper in each theme, and give them theme names like "Summer" "Winter" "Spring" "Fall" or whatever and call RainThemes with !Execute [#ADDONSPATH\RainThemes\RainThemes.exe" "/load ThemeName"]. RainThemes can set the wallpaper.
qqwe13
Posts: 3
Joined: August 20th, 2011, 11:17 pm

Re: Advanced wallpaper changing

Post by qqwe13 »

It seems that my RainTheme has some programs;
when I change another theme,the wallpaper doesn't follow.

1. rainmeter 2.1 Beta r912
2.Win7 32 bit Ultimate

there maybe many ways to change the wallpaper,the RainTheme can inside two or more ways,so that when the first didn't work,the second followed
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: Advanced wallpaper changing

Post by santa_ryan »

Input the full path name to the picture as a cmd line parameter.

E.G.

WallpaperChanger.exe "P:\Pictures\NewWallpaper.jpg"
WallpaperChanger.zip
You do not have the required permissions to view the files attached to this post.
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
blackXdrAg0n
Posts: 7
Joined: June 24th, 2012, 6:58 pm

Re: Advanced wallpaper changing

Post by blackXdrAg0n »

Hey all,

So I'm trying to change the theme based on the month, and so far I have it working, except for one major flaw. I am using the Calc Measure to determine the month and an If statement to change the theme. Basically, if the month =12, then
!Execute ["C:\Users\Name\Desktop\Rainmeter\Rainmeter.exe" !LoadLayout "Name of Layout"]

This keeps looping for some reason, and restarting rainmeter over and over again (every second). If I take it out of the If statement, it works fine. I tried opening firefox in the If statement, and that works fine. The issue just seems to be with loading a new layout. I have also tried what you said earlier with RainThemes, same result.

Any help would be greatly appreciated. Been spending entire days on figuring this out! Thanks.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Advanced wallpaper changing

Post by MerlinTheRed »

The problem is that !LoadLayout makes a refresh of all skins, meaning the ifAction will be fired every time. Do you have an entirely different set of skins for each month? Changing them based on the month in this fashion won't be easy.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
blackXdrAg0n
Posts: 7
Joined: June 24th, 2012, 6:58 pm

Re: Advanced wallpaper changing

Post by blackXdrAg0n »

Thanks for your quick response! That certainly clears things up.

I am trying to create a dynamic skin that will change slightly for one month out of the year. I only have 2 skins to deal with. Basically, when a certain month hits, I want the panel I created to move down on the screen and for the wallpaper to change. Do you know of any way this can be achieved without using !LoadLayout?
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Advanced wallpaper changing

Post by MerlinTheRed »

So basically you want the position of a skin be dependent on the current month?
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
blackXdrAg0n
Posts: 7
Joined: June 24th, 2012, 6:58 pm

Re: Advanced wallpaper changing

Post by blackXdrAg0n »

I actually just figured this out, for my purposes anyway. Instead of using !LoadLayout, I just used !Move and !SetWallpaper. So basically, I am moving it when a certain month hits and setting a new wallpaper. This works out a lot better than using a new theme. Thanks for your help!