It is currently March 28th, 2024, 5:15 pm

Skin Position Auto-Refresh

Get help with creating, editing & fixing problems with skins
Post Reply
dschmidt
Posts: 3
Joined: April 17th, 2018, 1:20 pm

Skin Position Auto-Refresh

Post by dschmidt »

Greetings! I'm fairly new to Rainmeter so forgive me if I'm missing something simple. I'm in IT support and it would be nice for users who call in to have basic info show in the lower right corner of their screen. I've accomplished this by using the sysinfo plugin to show IP address, username, and uptime, and have our company logo right above it for a little extra flare.

I'm able to fit the skins neatly in the lower right corner by the clock by using the #SCREENAREAHEIGHT# and #SCREENAREAWIDTH# variables in my rainmeter.ini, but the problem is that about half of our users have laptops that are frequently docked and undocked from larger monitors, thus changing the resolution while rainmeter is running. For example, when some one is docked with resolution 1920x1080 and they undock and go down to the laptop's native 1366x768 resolution rainmeter disappears and resides off-screen. Conversely, if they are undocked and it's in the corner while at 1366x768 and docking brings it to 1920x1080 the skins end up near the middle of the screen.

I can use the !refreshapp bang command to help with that issue, in fact, I have a startup script that runs that command every 15 seconds, but it's not always reliable that the script is going to continue running (I haven't explored too much as to why yet), but I'm curious if I'm going about this the wrong way.

TL;DR
Is there an auto-refresh feature in Rainmeter, or does it have a way to detect when the resolution changes and re-position the skins accordingly? Below is my ini files that I am using, hope that helps. Any help is appreciated.

Rainmeter.ini

Code: Select all

[Rainmeter]
Logging=0

[MeasureScreenWidth]
Measure=Plugin
Plugin=SysInfo
SysInfoType=SCREEN_WIDTH
SysInfoData=1

[MeasureScreenHeight]
Measure=Plugin
Plugin=SysInfo
SysInfoType=SCREEN_HEIGHT
SysInfoData=1

[SysInfo\SysInfo]
Active=1
WindowX=(#SCREENAREAWIDTH#-200)
WindowY=(#SCREENAREAHEIGHT#-87)
ClickThrough=1
Draggable=0
SnapEdges=1
KeepOnScreen=1
AlwaysOnTop=-1
AutoSelectScreen=0
SavePosition=0

[SysInfo\Logo]
Active=1
WindowX=(#SCREENAREAWIDTH#-200)
WindowY=(#SCREENAREAHEIGHT#-268)
ClickThrough=1
Draggable=0
SnapEdges=1
KeepOnScreen=1
AlwaysOnTop=-1
SavePosition=0
Sysinfo.ini

Code: Select all

[Rainmeter]
Update=1000

DynamicWindowSize=0
SkinWidth=256
SkinHeight=47
BackgroundMode=2
SolidColor=0,0,0,150

[MeasureIPAddress]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=Best
DynamicVariables=1

[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=USER_NAME

[MeasureUptime]
Measure=UpTime
Format="%4!i! days, %3!i! hours, %2!i! minutes %1!i! seconds"

[MeterIPAddress]
Meter=String
MeasureName=MeasureIPAddress
FontSize=8
FontColor=255,255,255,255
AntiAlias=1
Text=IP Address: %1

[MeterUserName]
Meter=String
MeasureName=MeasureUserName
FontSize=8
FontColor=255,255,255,255
AntiAlias=1
Text=User Name: %1
Y=2R

[MeterUptime]
Meter=String
MeasureName=MeasureUptime
FontSize=8
FontColor=255,255,255,255
AntiAlias=1
Text="Uptime: %1"
Y=3R
logo.ini

Code: Select all

[Rainmeter]
Update=1000

DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,0

[MeasureMyPictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=C:\Rainmeter
Subfolders=0
FileFilter=*.jpg;*.gif;*.bmp;*.png
UpdateDivider=10

[MeterShowPicture]
Meter=Image
MeasureName=MeasureMyPictures
X=25
Y=25
W=256
H=200
PreserveAspectRatio=1
LeftMouseUpAction=[!Refresh]
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Skin Position Auto-Refresh

Post by eclectic-tech »

You could look at an Addon: RainRez

This addon allows you to choose what skin "Layout" is used when the resolution changes. "Layouts" used to be called "Themes" and represent a predefined arrangement of skins.

You would need to include the RainRez addon, and have different "Layouts" included in your skin package for every possible resolution, so this may not be practical in your case. :(
Last edited by eclectic-tech on April 17th, 2018, 7:37 pm, edited 1 time in total.
dschmidt
Posts: 3
Joined: April 17th, 2018, 1:20 pm

Re: Skin Position Auto-Refresh

Post by dschmidt »

From what it looks like, this looks like exactly what I need! You think I'll run into issues with multiple monitor setups, or will it go off of the default primary monitor setting for each profile?

Either way, I'll play around with it and check back if it ends up working.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Skin Position Auto-Refresh

Post by eclectic-tech »

dschmidt wrote:From what it looks like, this looks like exactly what I need! You think I'll run into issues with multiple monitor setups, or will it go off of the default primary monitor setting for each profile?

Either way, I'll play around with it and check back if it ends up working.
I do not have multiple monitors, and don't change my setup resolution very often, so I do not have very much personal experience of using the plugin. :17flag

There are several later posts, in that thread, that you may find useful if you encounter any multiple monitor issues. :17readbook

Always happy to offer a suggestion :welcome:
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Skin Position Auto-Refresh

Post by SilverAzide »

I dock/undock my laptop all the time... Have you tried the position settings options? Right-click the skin, select Settings > Position > From Right, and From Bottom. This way the position will be relative to the bottom-right corner of your screen, regardless of the resolution. If the screen size changes, the skin will move. No need for RainRez or other positioning stuff.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Skin Position Auto-Refresh

Post by eclectic-tech »

Sweet find SilverAzide!

So your Rainmeter.ini section for those skins would be the skin width from the right and skin height from the bottom:

Code: Select all

...
WindowX=388R
WindowY=243B
...
Thanks! I learned something new today! :thumbup:
dschmidt
Posts: 3
Joined: April 17th, 2018, 1:20 pm

Re: Skin Position Auto-Refresh

Post by dschmidt »

Even better! I knew it had to be something simple. My Rainmeter.ini looks like this now:

Code: Select all

[Rainmeter]
Logging=0

[SysInfo\SysInfo]
Active=1
[b]WindowX=200R
WindowY=87B[/b]
ClickThrough=1
Draggable=0
SnapEdges=1
KeepOnScreen=1
AlwaysOnTop=-1
AutoSelectScreen=0
SavePosition=0

[SysInfo\Logo]
Active=1
[b]WindowX=200R
WindowY=268B[/b]
ClickThrough=1
Draggable=0
SnapEdges=1
KeepOnScreen=1
AlwaysOnTop=-1
SavePosition=0
It is now seamlessly repositioning when I undock and re-dock. Thanks for the great input guys!
Post Reply