Page 1 of 2

New IDLE_TIME SysInfo value

Posted: February 23rd, 2014, 6:45 pm
by jsmorley
We have added a new SysInfoType of IDLE_TIME to the SysInfo plugin.

This will return the number of seconds since the last user input (mouse or keyboard) to the operating system.

This can be used to have Rainmeter skin take some action (or inaction) based on the fact that the operating system has been "idle" for some number of seconds.

Here is one example of how you might use this information:

Code: Select all

[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
OnRefreshAction=[!Move 0 0][!ZPos 2][!Hide]

[Metadata]
Name=RainSaver
Author=JSMorley
Information=Rudimentary screen saver for Rainmeter, using new IDLE_TIME data from the SysInfo plugin.||Set IdleSeconds for the idle time you desire.
Version=Feb 25, 2014
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
IdleSeconds=600
FontSize=120
FontColor=255,255,255,255

[MeasureIdleTime]
Measure=Plugin
Plugin=SysInfo
SysInfoType=Idle_Time
IfAboveValue=#IdleSeconds#
IfAboveAction=[!EnableMeasureGroup "Measures"][!ShowMeterGroup "Meters"][!ToggleFade *]

[MeasureWakeUp]
Measure=Calc
Group=Measures
Formula=MeasureIdleTime
IfEqualValue=0
IfEqualAction=[!ToggleFade *][!Refresh]
Disabled=1

[MeasureTime]
Measure=Time
Group=Measures
Format=%A#CRLF#%B %#d %Y#CRLF#%#I:%M:%S
UpdateDivider=10
Disabled=1

[MeterBackground]
Meter=Image
Group=Meters
W=#SCREENAREAWIDTH#
H=#SCREENAREAHEIGHT#
SolidColor=47,47,47,230
UpdateDivider=-1
Hidden=1

[MeterTime]
Meter=String
Group=Meters
MeasureName=Measuretime
X=(#SCREENAREAWIDTH# / 2)
Y=(#SCREENAREAHEIGHT# / 2)
StringAlign=CenterCenter
FontSize=#FontSize#
FontColor=#FontColor#
AntiAlias=1
Hidden=1
RainSaver_1.0.rmskin
2014-02-23_121303.jpg
In effect this creates a very rudimentary "Rainmeter screensaver" ;-)

Change IdleSeconds to something smaller to test it without waiting so long...

Re: New IDLE_TIME SysInfo value

Posted: February 25th, 2014, 12:43 pm
by jsmorley
Made some changes to the logic of the example skin above to make it work more effeciently. Looking forward to seeing what kind of interesting animations or effects folks can come up with for a Rainmeter screensaver...

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 7:59 am
by Bgdrls
Great idea/job mate, tnx :thumbup:

Is there any trick yo hide mouse cursor when "screensaver" appear?

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 12:24 pm
by jsmorley
Bgdrls wrote:Great idea/job mate, tnx :thumbup:

Is there any trick yo hide mouse cursor when "screensaver" appear?
You could probably create an invisible .cur (cursor) file, and then use Mouse Cursor Actions to change the cursor in Rainmeter.

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 3:16 pm
by Bgdrls
Tnx a lot for the tips. I'm gonna try some of this tricks.

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 3:37 pm
by jsmorley
NoCursor.zip
If you get this .zip file and unzip the NoCursor.cur file into a folder called @Resources\Cursors\ in the root config folder of your skin, then you can use:

Code: Select all

[MeterBackground]
Meter=Image
Group=Meters
W=#SCREENAREAWIDTH#
H=#SCREENAREAHEIGHT#
SolidColor=47,47,47,230
LeftMouseUpAction=[]
MouseActionCursorName=NoCursor.cur
UpdateDivider=-1
Hidden=1
That will hide the cursor when the "screensaver" skin is toggled on, and set it back to the default cursor when you move the mouse or hit a key to "wake up".

It is simply a completely empty transparent .cur cursor file.

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 3:37 pm
by moshi
jsmorley wrote:You also could probably create an invisible .cur (cursor) file, and then use Mouse Cursor Actions to change the cursor in Rainmeter.
i have attached such a cursor. be careful though, i wouldn't recommend to use it in any other way than with MouseActionCursorName.
IRinvisible.zip

Re: New IDLE_TIME SysInfo value

Posted: February 26th, 2014, 3:38 pm
by jsmorley
moshi wrote: i have attached such a cursor. be careful though, i wouldn't recommend to use it in any other way than with MouseActionCursorName.
IRinvisible.zip
Beat you.. ;-)

Re: New IDLE_TIME SysInfo value

Posted: February 27th, 2014, 6:59 am
by Bgdrls
@jsmorley this one working like a charm, tnx.

But there is one problem. Screensaver appear also when I watch videos/movies in fullscreen, Youtube videos, etc... Any fix for this issue?

Re: New IDLE_TIME SysInfo value

Posted: February 27th, 2014, 2:42 pm
by jsmorley
Bgdrls wrote:@jsmorley this one working like a charm, tnx.

But there is one problem. Screensaver appear also when I watch videos/movies in fullscreen, Youtube videos, etc... Any fix for this issue?
No, I don't know of any way for Rainmeter to detect that a full-screen application is running. Again, there may be some third party addon that could be used to detect a full-screen app and send some "stay alive" keystroke to the system, but I have never had occasion to look into it.

Before this gets too much further, I would say that it is not our intention to try and turn Rainmeter into a full-blown screensaver or power management tool. The skin I posted was just meant to demonstrate one way that you might use the new IDLE_TIME value for SysInfo, and if you really want a fully functional screensaver that takes advantage of all the subtle capabilities available to the .scr screensaver development environment supported in Windows, you might take a look at one of the many tools available to create them.