Skip to content

A rainmeter skin that will automatically switch to a specific layout on resolution changes

Notifications You must be signed in to change notification settings

JoeSiu/RainMeterAutoLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

RainMeterAutoLayout

A rainmeter skin that will automatically switch to a specific layout on resolution changes. I often need to connect / disconnect multiple monitors, and Rainmeter seems doesn't provide a way to auto switch the layout when that happens, I will need to manually switch layout everytime that happens, which is annoying.

So far I only found a tool named RainRez that offers similar functionality, but it only checks the default monitor's resolution, and requires running a separate .exe file, therefore I decided to make my own...

Demo

As shown, the skin will automatically switch to 3 different layouts based on the connected display resolutions.

RainMeterAutoLayout_Demo.mp4

Installation

  1. Download the .rmskin file from the Releases section.
  2. Double click the .rmskin file to install the skin.

Usage

  1. To utilize AutoLayout, you must first load the AutoLayout/Main.ini for each layout you want to switch to, and then save the layout. image image
  2. Edit the configuration files located at ~YourRainMeterSkinFolder\AutoLayout\@Resources\Variables.inc, specifically the LayoutMap variable.
  3. The skin will monitor any resolution changes, and auto switch to the associated layout in LayoutMap if provided.

Configs

Variables Description Default
EnableMonitoring Determines whether resolution monitoring is enabled (0 to disable, 1 to enable). 1
EnableDebugString Determines whether the debug string meter is displayed at the center of the screen (0 to disable, 1 to enable). 0
OnLoadDelayTime Delay time (in seconds) after the skin is loaded before starting the resolution monitoring. 5
EnableDefaultLayout Determines whether to fallback to the DefaultLayout if no resolution layout is found after a resolution change (0 to disable, 1 to enable). 0
DefaultLayout Specifies the default layout name to fallback to. This is only used if EnableDefaultLayout is set to 1.
LayoutMap Associates resolutions with layouts.
Format: {virtual screen width}x{virtual screen height}={layout name}, separated by LayoutMapDelimiter.
LayoutMapDelimiter The delimiter used in LayoutMap. "|"

Note

  • The term "virtual screen" refers to the screen that encompasses all display monitors. For example, if two horizontally aligned monitors with resolutions of 2560x1440 and 1920x1080, the virtual screen size would be 4480x1440. Refer to Rainmeter documentation for info.
  • In the LayoutMap variable, if for example value "4480x1440=Layout1|2560x1440=Layout2|1920x1080=Layout3" is provided:
    • Both the 1440p and 1080p monitors are connected → switch to Layout1
    • Only the 1440p monitor is connected → switch to Layout2
    • Only the 1080p monitor is connected → switch to Layout3
  • The skin will check resolution changes every second, modify the skin's update rate if needed.
  • Check Rainmeter's log for log messages from the skin.