Built-In Variables


Rainmeter automatically creates a number of helpful variables for each skin. These variables do not need to be defined in the [Variables] section and cannot be directly modified by actions in a skin.

Note: All path variables already contain a trailing slash "\".

Path variables

#PROGRAMDRIVE# Example: C: or \\server\Users\

Drive or server Rainmeter is located on.

#PROGRAMPATH# Example: C:\Program Files\Rainmeter\

Path to the program folder containing Rainmeter.exe.

#SETTINGSPATH# Example: C:\Users\YourName\Appdata\Roaming\Rainmeter\

Path to the folder containing Rainmeter.ini and other settings files and folders.

#SKINSPATH# Example: C:\Users\YourName\Documents\Rainmeter\Skins\

Path to the skins folder.

#PLUGINSPATH# Example: C:\Program Files\Rainmeter\Plugins\

Path to the built-in plugins folder.

#ADDONSPATH# Example: C:\Users\YourName\Appdata\Roaming\Rainmeter\Addons\

Path to the addons folder.

Note: #ADDONSPATH# should be avoided when possible. Addons should be kept in the @Resources folder instead.

Skin variables

#@# Example: C:\Users\YourName\Documents\Rainmeter\Skins\illustro\@Resources\

Path to the @Resources folder for the current skin.

#CURRENTPATH# Example: C:\Users\YourName\Documents\Rainmeter\Skins\illustro\Clock\

Path to the folder containing the current skin file.

#CURRENTFILE# Example: Clock.ini

File name of the current skin.

#ROOTCONFIGPATH# Example: C:\Users\YourName\Documents\Rainmeter\Skins\illustro\

Path to Root config - Highest-level folder under the skins folder for the current skin.

#ROOTCONFIG# Example: illustro

Name of Root config - Highest-level folder under the skins folder for the current skin.

#CURRENTCONFIG# Example: illustro\Clock

Config name of current skin.

#CURRENTCONFIGX#, #CURRENTCONFIGY#, #CURRENTCONFIGWIDTH#, #CURRENTCONFIGHEIGHT#

Position and size of the current skin.

Note: These variables are dynamic, and will require DynamicVariables=1 where they are used to reflect changing values.

#CURRENTCONFIGZPOS#

Z-Position (front to back) of the current skin.

Note: This variable is dynamic, and will require DynamicVariables=1 where it is used to reflect changing values.

Miscellaneous variables

#CRLF#

Creates a \n newline control character where used. Useful in String meters to display text on separate lines.

Example: Text=Line1#CRLF#Line2


Note: The Windows standard \r\n (carriage return / linefeed) is not needed in String meters in Rainmeter, but it you wanted to obtain that, perhaps to write to some file, you would use the Character Reference Variables syntax of [\13][\10], which would be resolved to \r\n, or carriage return / linefeed.

#CURRENTSECTION#

The name of the section in which the variable is used.

Note: This can be used with GetVariable in an Inline Lua function to return the "calling" section that is accessing the function.

#CONFIGEDITOR#

The path and executable for the text editor defined in ConfigEditor in Rainmeter settings, or the text editor associated with .ini files in Windows. The default will be Windows Notepad.exe.

Note: This variable is dynamic, and will require DynamicVariables=1 to detect changes made to this setting while the skin is running.

Example: LeftMouseUpAction=["#CONFIGEDITOR#" "#@#Variables.inc"].

Monitor variables

Notes:

Monitor variables are dynamic, and DynamicVariables=1 will be required to detect changes when used in a skin. The values will be static when used in the [Rainmeter] section of a skin.

When the variables are used without specifying an @N monitor number, by default the values will be based on the primary monitor, where Rainmeter is started. In order to have the values reflect the monitor the skin is currently on, set AutoSelectScreen to "1" in Manage. or alternately, use the !AutoSelectScreen bang in the skin.

#WORKAREAX#, #WORKAREAY#, #WORKAREAWIDTH#, #WORKAREAHEIGHT#

Work area position and size of the current monitor.

#SCREENAREAX#, #SCREENAREAY#, #SCREENAREAWIDTH#, #SCREENAREAHEIGHT#

Screen area position and size of the current monitor.

#PWORKAREAX#, #PWORKAREAY#, #PWORKAREAWIDTH#, #PWORKAREAHEIGHT#

Work area position and size of the primary monitor.

#PSCREENAREAX#, #PSCREENAREAY#, #PSCREENAREAWIDTH#, #PSCREENAREAHEIGHT#

Screen area position and size of the primary monitor.

#WORKAREAX@N#, #WORKAREAY@N#, #WORKAREAWIDTH@N#, #WORKAREAHEIGHT@N#

Work area position and size of the Nth monitor.

#SCREENAREAX@N#, #SCREENAREAY@N#, #SCREENAREAWIDTH@N#, #SCREENAREAHEIGHT@N#

Screen area position and size of the Nth monitor.

#VSCREENAREAX#, #VSCREENAREAY#, #VSCREENAREAWIDTH#, #VSCREENAREAHEIGHT#

Position and size of the virtual screen.