It is currently April 27th, 2024, 9:10 am

Keep on screen?

Report bugs with the Rainmeter application and suggest features.
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Keep on screen?

Post by Kolano »

I'm confused about the "Keep on screen" setting. Does that mean "Keep on the screen the skin is initially assigned to" or "Keep on a visible screen"?

Regardless of which way I twiddle things, my widgets jump all over the place each time I power off/on any of my three monitors. I think part of the problem may be things failing to respect Windows "Scale and layout" > 100% appropriately, as I frequently have to drag around widgets to get them to size correctly, but that seems to fail to explain the seemingly random and frequently off-screen locations things get moved to (i.e. off-screen of all three monitors after powering them back on, regardless of "Keep on screen" being selected or not).

I love the functionality of Rainmeter, but I'm really growing tired of needing to...
  • Open Manage skin on some visible widget
  • Select each missing widget
  • Manually reset each's coordinates to appear on screen
  • Manually reset each to it's appropriate position
  • Manually wiggle onscreen widgets to get them to scale appropriately
  • Move them to be positioned appropriately
...every time I power monitors on and off.

The tool to reload specific Rainmeter layouts when detecting different number of monitors was also failing for me. I think due to each of the three monitors powering on in different orders confusing the transition from 1 > 2 >3, though perhaps I didn't fight with it enough.

Would very much appreciate advice on resolving this situation, and hope that future version of Rainmeter might handle it better.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2611
Joined: March 23rd, 2015, 5:26 pm

Re: Keep on screen?

Post by SilverAzide »

Kolano wrote: August 29th, 2023, 1:53 am Would very much appreciate advice on resolving this situation, and hope that future version of Rainmeter might handle it better.
So have you tried any of the positioning settings? In other words, right-click a skin, then from the context menu select Settings > Position. From here, you can set the skin to appear on specific monitors or (most importantly) select whether the skin is positioned relative to the left or right side of the screen. You might have inadvertently forced the skin to a monitor that doesn't exist or something (when powering monitors off and on, your desktop changes size and your skins might be trying to compensate for it).

You can also use a utility like RainRez (or create an invisible "layout switcher" skin that does the same thing) that watches for changes to your desktop and autoloads specific layouts depending on certain desktop resolutions.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Keep on screen?

Post by Yincognito »

Alternatively for what SilverAzide mentioned, you can check your Rainmeter.ini and make sure the skins' WindowX and WindowY (and optionally AnchorX and AnchorY, if needed) are set to the specific monitor where you want them. See the end of the WindowX / WindowY description at:
https://docs.rainmeter.net/manual/settings/skin-sections/

If those coordinates are set properly, the jumping on another monitor should normally not happen...

At worst, placing skins on your 1, 2, 3 monitors might be swapped due to a different powering on order, but that would be a detail not affecting the typical positioning in a significant manner.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

Thanks for the feedback.

Reviewing the "Position" menu I can confirm the widgets are assigned to specific monitors. Part of the problem with things moving around does seem related to some being set to "On desktop" rather than "Normal". Setting them to Normal has at least kept them on their related monitors for a couple power cycles. Though another part of the problem may also be that I have multiple monitors that are both identified as "Generic PnP Monitor", so perhaps it's unclear which is which as they cycle.

Unfortunately I still have issues with the widgets not respecting the monitor's "Scale and layout" settings post power cycles. But I guess wiggling widgets is less work than I formerly had to go through.
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

Chiming in again after further ongoing frustration with this. I can't work out any set of settings that keep widgets on their assigned screens and positioned correctly therein.

I have each widget:
-Settings > Position > Display Monitor > Assigned to a particular monitor
-Settings > Position > Normal rather than Keep on Desktop
-Settings > Position > From Right
-Settings > Keep on screen disabled

Code: Select all

[Kolano\RAM]
Active=1
WindowX=-250R@2
WindowY=-828@2
ClickThrough=0
Draggable=1
SnapEdges=1
KeepOnScreen=0
AlwaysOnTop=0
AutoSelectScreen=0
But still nearly every time I power monitors on and off widgets reposition inappropriately frequently completely offscreen.

I've also tried the RainRez tool, but that doesn't seem to work out at it seems to rely on Rainmeter layouts to reposition things correctly and those also seem to fail to work here. I'll save a layout, cycle the monitors, find widgets re-positioned seemingly randomly, load the layout and they remain in the new random locations.

It's so frustrating to wake up each day needing to drag widgets around and poke in settings to get them to their appropriate positions.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Keep on screen?

Post by Yincognito »

Kolano wrote: January 20th, 2024, 4:18 pm Chiming in again after further ongoing frustration with this. I can't work out any set of settings that keep widgets on their assigned screens and positioned correctly therein.

I have each widget:
-Settings > Position > Display Monitor > Assigned to a particular monitor
-Settings > Position > Normal rather than Keep on Desktop
-Settings > Position > From Right
-Settings > Keep on screen disabled

Code: Select all

[Kolano\RAM]
Active=1
WindowX=-250R@2
WindowY=-828@2
ClickThrough=0
Draggable=1
SnapEdges=1
KeepOnScreen=0
AlwaysOnTop=0
AutoSelectScreen=0
But still nearly every time I power monitors on and off widgets reposition inappropriately frequently completely offscreen.

I've also tried the RainRez tool, but that doesn't seem to work out at it seems to rely on Rainmeter layouts to reposition things correctly and those also seem to fail to work here. I'll save a layout, cycle the monitors, find widgets re-positioned seemingly randomly, load the layout and they remain in the new random locations.

It's so frustrating to wake up each day needing to drag widgets around to get them to their appropriate positions.
Unfortunately, I don't have a multi monitor setup so I can't test any of this, but I'm sure that a solution exists. Logically, what happens seems normal, since when you power off a monitor, those coordinates where you had your skin wouldn't exist anymore (well, they would, but would be off screen, as you noticed) and Rainmeter probably either keeps them in the same place (thus, an invalid position when the monitor is off) or repositions them to adapt to the new situation (thus, repositioning in ways you don't want).

If it were me, I would try to find a way to detect when a monitor is on or off, then have the skins react dynamically to that, via some appropriate skin bangs (e.g. unload or hide skin if the monitor it is on is off, and do the reverse as well as restoring positions if it's on). I would make some very simple skins that provide all monitor variable values or some other registry values of interest that could help in identifying when monitors change their state and figure out the best way to foresee that change, then implement the reaction to that in the skins accordingly. Obviously, since those test skins can go off screen at times, I would watch the About > Skins tab instead in order to look for changes that could tell me that the monitors' state has changed as well. So, from my point of view, the only question here would be what value that can be provided by Rainmeter to look for when reacting to the change of state for monitors - once you know that, the rest should be trivial.

Some searches related to the subject - it doesn't look like there are many reliable ways to detect that, and some answers seems to indicate that Windows itself is sometimes confused in that regard too:
https://superuser.com/questions/1748460/are-windows-programs-able-to-detect-that-my-screen-is-off-and-change-their-behav
https://superuser.com/questions/1529655/windows-check-if-the-monitor-is-powered-on-or-off-check-with-software
https://stackoverflow.com/questions/203355/is-there-any-way-to-detect-the-monitor-state-in-windows-on-or-off
So, I suppose your best bet is to hope that examining Rainmeter's monitor variables alone can be a good enough indicator of that.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
SilverAzide
Rainmeter Sage
Posts: 2611
Joined: March 23rd, 2015, 5:26 pm

Re: Keep on screen?

Post by SilverAzide »

Kolano wrote: January 20th, 2024, 4:18 pm Chiming in again after further ongoing frustration with this. I can't work out any set of settings that keep widgets on their assigned screens and positioned correctly therein.
Just a curiousity question for you, since I don't have but 2 monitors to test with and I don't see your sort of issue. When you start up Windows, are the monitors assigned the same numbers every time? If you look at the Rainmeter.log file, you'll see a block of diagnostic output beginning with EnumDisplayDevices / EnumDisplaySettings API, and at the bottom of this section it will list the configuration it has found.

Is this section the same each time you boot up? :confused:

When you power monitors on and off, you should see additional logging (I think).
Gadgets Wiki GitHub More Gadgets...
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

SilverAzide wrote: January 20th, 2024, 7:33 pm Just a curiousity question for you, since I don't have but 2 monitors to test with and I don't see your sort of issue. When you start up Windows, are the monitors assigned the same numbers every time?
I almost never reboot Windows, only power monitors on/off. Monitors are assigned the same number 1,2,3 each time. Presumably they may change if only some of the monitors are on, so having some way to reference them besides those numbers would be helpful, but I'm not concerned with that state at this time. The displays do have unique names in Windows Display > Advanced display but seem to all be called "Generic PnP Monitor" elsewhere exposed to Rainmeter.
SilverAzide wrote: January 20th, 2024, 7:33 pm If you look at the Rainmeter.log file,
Where is this file found? It's not under...
C:\Users\kolan\OneDrive\Documents\Rainmeter with my skins.
nor C:\Users\kolan\AppData\Roaming\Rainmeter
nor C:\Program Files\Rainmeter
nor anywhere under C:\Users\kolan per Windows search

I do see...
System: Work area changed
System: Display settings changed
...under the in app log, but no relevant details are provided.
Last edited by Kolano on January 21st, 2024, 2:05 am, edited 3 times in total.
User avatar
Kolano
Posts: 24
Joined: October 23rd, 2015, 11:54 pm

Re: Keep on screen?

Post by Kolano »

Yincognito wrote: January 20th, 2024, 5:21 pm If it were me, I would try to find a way to detect when a monitor is on or off, then have the skins react dynamically to that, via some appropriate skin bangs (e.g. unload or hide skin if the monitor it is on is off, and do the reverse as well as restoring positions if it's on). I would make some very simple skins that provide all monitor variable values or some other registry values of interest that could help in identifying when monitors change their state and figure out the best way to foresee that change, then implement the reaction to that in the skins accordingly. Obviously, since those test skins can go off screen at times, I would watch the About > Skins tab instead in order to look for changes that could tell me that the monitors' state has changed as well. So, from my point of view, the only question here would be what value that can be provided by Rainmeter to look for when reacting to the change of state for monitors - once you know that, the rest should be trivial.
I'm not trying to adjust to varying monitor configurations. I just want widgets to appear in the same positions across my three monitors when they are all on. Having that also be the case regardless of which of the three were powered would also be nice, but not my concern at this time, and sounds painful to implement.

All I want it for the widgets to maintain their positions, seems like such should be simple but it's apparently not.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Keep on screen?

Post by Yincognito »

Kolano wrote: January 21st, 2024, 1:54 am I'm not trying to adjust to varying monitor configurations. I just want widgets to appear in the same positions across my three monitors when they are all on. Having that also be the case regardless of which of the three were powered would also be nice, but not my concern at this time, and sounds painful to implement.
I might be wrong, but turning monitors on and off or powering on in different orders is precisely about different monitor configurations. Anyway, as you wish - no pain, no gain. :confused:
Since you're reluctant to put a bit of effort into the helper skin(s) that I mentioned above, I did it for you this time, maybe it helps to better show what happens with the coordinates and stuff:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,255,0,255
OnRefreshAction=[!CommandMeasure MonitorScale "Run"]

---Measures---

[WorkAreaCX]
Measure=Calc
Formula=#WORKAREAX#
DynamicVariables=1

[WorkAreaCY]
Measure=Calc
Formula=#WORKAREAY#
DynamicVariables=1

[WorkAreaCW]
Measure=Calc
Formula=#WORKAREAWIDTH#
DynamicVariables=1

[WorkAreaCH]
Measure=Calc
Formula=#WORKAREAHEIGHT#
DynamicVariables=1

[ScreenAreaCX]
Measure=Calc
Formula=#SCREENAREAX#
DynamicVariables=1

[ScreenAreaCY]
Measure=Calc
Formula=#SCREENAREAY#
DynamicVariables=1

[ScreenAreaCW]
Measure=Calc
Formula=#SCREENAREAWIDTH#
DynamicVariables=1

[ScreenAreaCH]
Measure=Calc
Formula=#SCREENAREAHEIGHT#
DynamicVariables=1

[WorkAreaPX]
Measure=Calc
Formula=#PWORKAREAX#
DynamicVariables=1

[WorkAreaPY]
Measure=Calc
Formula=#PWORKAREAY#
DynamicVariables=1

[WorkAreaPW]
Measure=Calc
Formula=#PWORKAREAWIDTH#
DynamicVariables=1

[WorkAreaPH]
Measure=Calc
Formula=#PWORKAREAHEIGHT#
DynamicVariables=1

[ScreenAreaPX]
Measure=Calc
Formula=#PSCREENAREAX#
DynamicVariables=1

[ScreenAreaPY]
Measure=Calc
Formula=#PSCREENAREAY#
DynamicVariables=1

[ScreenAreaPW]
Measure=Calc
Formula=#PSCREENAREAWIDTH#
DynamicVariables=1

[ScreenAreaPH]
Measure=Calc
Formula=#PSCREENAREAHEIGHT#
DynamicVariables=1

[WorkArea1X]
Measure=Calc
Formula=#WORKAREAX@1#
DynamicVariables=1

[WorkArea1Y]
Measure=Calc
Formula=#WORKAREAY@1#
DynamicVariables=1

[WorkArea1W]
Measure=Calc
Formula=#WORKAREAWIDTH@1#
DynamicVariables=1

[WorkArea1H]
Measure=Calc
Formula=#WORKAREAHEIGHT@1#
DynamicVariables=1

[WorkArea2X]
Measure=Calc
Formula=#WORKAREAX@2#
DynamicVariables=1

[WorkArea2Y]
Measure=Calc
Formula=#WORKAREAY@2#
DynamicVariables=1

[WorkArea2W]
Measure=Calc
Formula=#WORKAREAWIDTH@2#
DynamicVariables=1

[WorkArea2H]
Measure=Calc
Formula=#WORKAREAHEIGHT@2#
DynamicVariables=1

[WorkArea3X]
Measure=Calc
Formula=#WORKAREAX@3#
DynamicVariables=1

[WorkArea3Y]
Measure=Calc
Formula=#WORKAREAY@3#
DynamicVariables=1

[WorkArea3W]
Measure=Calc
Formula=#WORKAREAWIDTH@3#
DynamicVariables=1

[WorkArea3H]
Measure=Calc
Formula=#WORKAREAHEIGHT@3#
DynamicVariables=1

[ScreenArea1X]
Measure=Calc
Formula=#SCREENAREAX@1#
DynamicVariables=1

[ScreenArea1Y]
Measure=Calc
Formula=#SCREENAREAY@1#
DynamicVariables=1

[ScreenArea1W]
Measure=Calc
Formula=#SCREENAREAWIDTH@1#
DynamicVariables=1

[ScreenArea1H]
Measure=Calc
Formula=#SCREENAREAHEIGHT@1#
DynamicVariables=1

[ScreenArea2X]
Measure=Calc
Formula=#SCREENAREAX@2#
DynamicVariables=1

[ScreenArea2Y]
Measure=Calc
Formula=#SCREENAREAY@2#
DynamicVariables=1

[ScreenArea2W]
Measure=Calc
Formula=#SCREENAREAWIDTH@2#
DynamicVariables=1

[ScreenArea2H]
Measure=Calc
Formula=#SCREENAREAHEIGHT@2#
DynamicVariables=1

[ScreenArea3X]
Measure=Calc
Formula=#SCREENAREAX@3#
DynamicVariables=1

[ScreenArea3Y]
Measure=Calc
Formula=#SCREENAREAY@3#
DynamicVariables=1

[ScreenArea3W]
Measure=Calc
Formula=#SCREENAREAWIDTH@3#
DynamicVariables=1

[ScreenArea3H]
Measure=Calc
Formula=#SCREENAREAHEIGHT@3#
DynamicVariables=1

[ScreenAreaVX]
Measure=Calc
Formula=#VSCREENAREAX#
DynamicVariables=1

[ScreenAreaVY]
Measure=Calc
Formula=#VSCREENAREAY#
DynamicVariables=1

[ScreenAreaVW]
Measure=Calc
Formula=#VSCREENAREAWIDTH#
DynamicVariables=1

[ScreenAreaVH]
Measure=Calc
Formula=#VSCREENAREAHEIGHT#
DynamicVariables=1

[ConfigCX]
Measure=Calc
Formula=#CURRENTCONFIGX#
DynamicVariables=1

[ConfigCY]
Measure=Calc
Formula=#CURRENTCONFIGY#
DynamicVariables=1

[ConfigCW]
Measure=Calc
Formula=#CURRENTCONFIGWIDTH#
DynamicVariables=1

[ConfigCH]
Measure=Calc
Formula=#CURRENTCONFIGHEIGHT#
DynamicVariables=1

[SkinSettings]
Measure=WebParser
URL=file://#SETTINGSPATH#Rainmeter.ini
CodePage=1200
RegExp=(?siU)(\[#CURRENTCONFIG#\].*)(?=\[|$)
StringIndex=1
UpdateRate=-1
FinishAction=[!UpdateMeter *][!Redraw]
RegExpSubstitute=1
Substitute="\R{2,}":""
DynamicVariables=1

[MonitorScale]
Measure=Plugin
Plugin=RunCommand
Program=powershell
Parameter=-command $activemonitorsregpath = 'HKCU:\Control Panel\Desktop\PerMonitorSettings'; $genericmonitorslist = Get-ChildItem 'HKLM:\System\CurrentControlSet\Control\GraphicsDrivers\ScaleFactors'; $dpicode = New-Object PSObject -Property @{'4294967295' = '100%'; '4294967294' = '100%'; '0' = '125%'; '1' = '150%'; '2' = '175%';}; $monitors = @(); $monitorindex = 0; foreach ($genericmonitor in $genericmonitorslist) {$regpath = $activemonitorsregpath + '\' + $genericmonitor.PsChildname; if (Test-Path -Path $regpath) {$dpivalue = (Get-ItemProperty -Path $regpath -Name 'DpiValue').'DpiValue'; $monitors += New-Object PSObject -Property @{'Index' = $monitorindex; 'Place' = $regpath; 'Scale' = $dpicode.$dpivalue}; $monitorindex++;}} $monitors | format-list;
State=Hide
OutputType=ANSI
Timeout=10000
FinishAction=[!UpdateMeter *][!Redraw]
RegExpSubstitute=1
Substitute="\R{3,}":""
DynamicVariables=1

---Meters---

[Infos]
Meter=String
FontFace=Consolas
FontSize=10
AntiAlias=1
MeasureName=WorkAreaCX
MeasureName2=WorkAreaCY
MeasureName3=WorkAreaCW
MeasureName4=WorkAreaCH
MeasureName5=ScreenAreaCX
MeasureName6=ScreenAreaCY
MeasureName7=ScreenAreaCW
MeasureName8=ScreenAreaCH
MeasureName9=WorkAreaPX
MeasureName10=WorkAreaPY
MeasureName11=WorkAreaPW
MeasureName12=WorkAreaPH
MeasureName13=ScreenAreaPX
MeasureName14=ScreenAreaPY
MeasureName15=ScreenAreaPW
MeasureName16=ScreenAreaPH
MeasureName17=WorkArea1X
MeasureName18=WorkArea1Y
MeasureName19=WorkArea1W
MeasureName20=WorkArea1H
MeasureName21=WorkArea2X
MeasureName22=WorkArea2Y
MeasureName23=WorkArea2W
MeasureName24=WorkArea2H
MeasureName25=WorkArea3X
MeasureName26=WorkArea3Y
MeasureName27=WorkArea3W
MeasureName28=WorkArea3H
MeasureName29=ScreenArea1X
MeasureName30=ScreenArea1Y
MeasureName31=ScreenArea1W
MeasureName32=ScreenArea1H
MeasureName33=ScreenArea2X
MeasureName34=ScreenArea2Y
MeasureName35=ScreenArea2W
MeasureName36=ScreenArea2H
MeasureName37=ScreenArea3X
MeasureName38=ScreenArea3Y
MeasureName39=ScreenArea3W
MeasureName40=ScreenArea3H
MeasureName41=ScreenAreaVX
MeasureName42=ScreenAreaVY
MeasureName43=ScreenAreaVW
MeasureName44=ScreenAreaVH
MeasureName45=ConfigCX
MeasureName46=ConfigCY
MeasureName47=ConfigCW
MeasureName48=ConfigCH
MeasureName49=SkinSettings
MeasureName50=MonitorScale
Text=C. Work Area (%1, %2, %3, %4)#CRLF#C. Screen Area (%5, %6, %7, %8)#CRLF#P. Work Area (%9, %10, %11, %12)#CRLF#P. Screen Area (%13, %14, %15, %16)#CRLF#Work Area #1 (%17, %18, %19, %20)#CRLF#Work Area #2 (%21, %22, %23, %24)#CRLF#Work Area #3 (%25, %26, %27, %28)#CRLF#Screen Area #1 (%29, %30, %31, %32)#CRLF#Screen Area #2 (%33, %34, %35, %36)#CRLF#Screen Area #3 (%37, %38, %39, %40)#CRLF#V. Screen Area (%41, %42, %43, %44)#CRLF#C. Config (%45, %46, %47, %48)#CRLF##CRLF#Skin Settings (click to retrieve)#CRLF#%49#CRLF##CRLF#Windows Scaling (click to retrieve)%50
LeftMouseUpAction=[!CommandMeasure SkinSettings "Update"][!CommandMeasure MonitorScale "Run"]
DynamicVariables=1
More info on the scaling part (at least how it looks for me), here:
https://forum.rainmeter.net/viewtopic.php?t=18849&start=160#p214875
A somewhat related discussion regarding multiple monitors and scaling:
https://forum.rainmeter.net/viewtopic.php?t=43180&start=30#p220135
As for the rest, it's up to you (or maybe SilverAzide has a better idea, I don't know).
For the log question, see:
https://docs.rainmeter.net/manual/user-interface/manage/#SettingsTab
https://docs.rainmeter.net/manual/user-interface/manage/#Logging
Basically you have to check some boxes to have that file (and probably a Rainmeter restart too).

One quick question though: are your skins placed in the right positions if you restart Rainmeter? I mean, no dragging with the mouse to reposition or loading any layout after they get messed up, just exiting Rainmeter and executing it again. Assuming, of course, that they were set in the correct positions before the jumping off place occurs.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth