Documentation for the latest release version of Rainmeter. Use links in the sidebar to navigate.
Download the latest release or beta version from http://rainmeter.net. The installer (.exe) allows you to install both 'standard' and 'portable' installations.
Both 32bit and 64bit installations are done with the same installer.
If you are running on a 64bit version of Windows, you will be asked if you wish to install 64bit or 32bit Rainmeter. If the installer detects a previous version of Rainmeter on your system, the same architecture version will automatically be installed. If you wish to change from 32bit to 64bit, you should uninstall Rainmeter first.
Rainmeter will detect if you require either the C++ runtime libraries or the .NET libraries. The C++ runtimes are required to use Rainmeter. Chances are you already have them, but if not, Rainmeter will download and install them. The .NET libraries are required to use any of the C# plugins which come with Rainmeter. If you are running on Windows XP you will need at least Windows XP Service Pack 2 to install the .NET libraries. If you elect not to install the .NET files, you will not be able to use any plugins written in C#.
Rainmeter is fully compatible with Windows XP, Vista, and Windows 7.
The file which Rainmeter uses to keep track of the skins you have loaded and how they are configured (Rainmeter.ini) is stored in your "Application Data" folder, and all Rainmeter "skins" are stored in your "My Documents" folder.
Run the installer. By default Rainmeter will install in "C:\Program Files\Rainmeter", but you may install it in any folder you wish. The installer presents you with a set of options allowing you to create Start Menu and desktop shortcuts, have Rainmeter automatically start with Windows, and install Rainmeter for all users.
When Rainmeter starts the first time, it will install the default skins and themes in the proper folder locations and load the illustro suite of skins.
If you wish to run Rainmeter from one folder, so it can be easily taken with you or even run directly from a removable drive, all you need to do is download the latest installer and select 'Portable Install' during the install process. You will be prompted to browse for a location (for which you have full read and write access) to install Portable Rainmeter. After the install, you may use the program normally, but can easily take the application "on the road" by copying the entire \Rainmeter folder and sub-folders. Note that if you do a portable install, you are responsible for ensuring you have the appropriate C++ and .NET runtime libraries installed on your system.
Rainmeter can be installed silently (i.e. without user interaction) starting from version 2.1 beta. This is useful, for example, when deploying Rainmeter during the initial Windows setup. View switches and return values.
If you installed Rainmeter with the installer you can uninstall it from "Add or Remove Programs". If you installed Portable Rainmeter, just delete the folder you browsed for during the install process.
Ensure that Rainmeter is not running when uninstalling.
There is no fancy settings editor, so you need to change the settings with your favorite text editor. The general configuration settings are in a file named Rainmeter.ini. The skin settings are in the skin's respective .ini files.
Rainmeter.ini is in the following location:
Windows XP: C:\Documents and Settings\YourName\Application Data\Rainmeter
Windows Vista and later: C:\Users\YourName\Appdata\Roaming\Rainmeter
The file can be edited by using "Edit Settings" from the Rainmeter context menu or Manager.
The Rainmeter.ini file has several sections: [Rainmeter], [TrayMeasure], and individual sections for each config which has been loaded. The Rainmeter section contains general settings that can be used to change how Rainmeter behaves. The settings are used as default values for all new configs that are opened. Once a config is opened it will write the settings under its own section in the Rainmeter.ini file.
Important: Some of the settings in the Rainmeter.ini file cannot be changed while Rainmeter is running becase a refresh will write the old values back to the ini file. If you cannot change something, try changing the value after completely closing Rainmeter.
The [Rainmeter] section of Rainmeter.ini defines general Rainmeter settings. The following must be put under the [Rainmeter] section:
DesktopWorkArea=0,0,1500,1200). Note that moving the taskbar will reset the workarea to Windows' default, as will changing screen resolution. If you have multiple monitors, you can set the DesktopWorkArea for a specific monitor by adding @ and the number of the monitor to the end of DesktopWorkArea. DesktopWorkArea= or DesktopWorkArea@0= is the primary monitor, and DesktopWorkArea@1-@xx is a specific monitor.C:\Documents and Settings\YOURNAME\My Documents\Rainmeter\SkinsC:\Users\YOURNAME\My Documents\Rainmeter\Skins
DisableVersionCheck=1. Note that only release (not beta) versions of Rainmeter are checked for.One special section is [TrayMeasure], which can be used to define a measure for the tray icon. You can use any measure for this as long as it returns some meaningful values (i.e. numbers between some limits). The following must be put under the [TrayMeasure] section:
TrayMeter=HISTOGRAM.TrayMeter=HISTOGRAM.TrayBitmap=tray-%i.ico would read the icons files tray-1.ico, tray-2.ico, tray-3.ico and so on as long as it can find them. The format specification is like printf (e.g. TrayBitmap=tray-%02i.ico will load tray-01.ico, tray-02.ico, ...)LoadOrder=-1, LoadOrder=2 and LoadOrder=5 would load the configs in that order, with the config with LoadOrder=-1 appearing beneath the one with LoadOrder=2 which is in turn beneath the config containing LoadOrder=5. If two configs have the same value for LoadOrder, they are then loaded in alphabetical order. LoadOrder must be set manually in Rainmeter.ini by selecting "Edit Settings..." from the tray context menu.The following are pre-existing variables that are set and controlled by Rainmeter (i.e. their value cannot be manually changed). These variables may be used anywhere, including within Rainmeter.ini.
Note: Built-in Rainmeter variables that stand for a path already contain a trailing slash.
C: or \\server\Users\)C:\Program Files\Rainmeter\)%APPDATA%\Rainmeter\)C:\Users\YourName\My Documents\Rainmeter\Skins\)C:\Program Files\Rainmeter\Plugins\)C:\Program Files\Rainmeter\Addons\)C:\PathToSkinsFolder\illustro\Clock\)Clock.ini)illustro\Clock\)illustro\)The variables below are dynamic in nature. As a result, DynamicVariables=1 must be set on the measure or meter in which they are used (note that they cannot be used elsewhere like under the [Rainmeter] section):
You may also use Windows environment variables, which can be obtained by the set command in cmd.exe (command prompt). To use them, use the name of the environment variable within two percent sign (e.g. %APPDATA%). Note that environment variables may vary from system to system.
Configs can be categorized into "groups" to allow quick control of multiple configs at once. To add a Config to a group, simply add the Group statement to the section under Rainmeter.ini. Alternatively, you may add Group under the [Rainmeter] section of the skin file.
Any number of groups may be added to a section, all of which must be separated by a vertical bar (i.e. "|"). Groups may also be specified under the [Rainmeter] section of Rainmeter.ini. In this case, that group will be considered the default for all configs that have no groups defined.
Example (Rainmeter.ini):
[Enigma\Sidebar\Systems] Active=0 WindowX=0 WindowY=0 AlphaValue=255 FadeDuration=250 ClickThrough=0 SavePosition=1 SnapEdges=1 KeepOnScreen=1 Group=Enigma | SystemsThe Enigma\Sidebar\Systems config be added to the "Enigma" and "Systems" groups, which can then be controlled through several bangs.
Example (skin):
[Rainmeter] Update=1000 Author=Me Group=Enigma | SystemsThe skin is added to the "Enigma" and "Systems" groups, which can then be controlled through several bangs.
There is a "Display Monitor" submenu in [Skins Menu]-[Position] of the Rainmeter tray icon.
These menus set the position of the skin to the desired monitor in a multiple monitor configuration.
All skins are placed in the skin folder. Each skin must be in its own subfolder. The actual skin file is a normal .ini file with several sections that define the skin layout and values. A subfolder may contain several .ini files, but only one .ini file per folder can be active. This allows you, for example, to supply localized skins or different variations of some skin.
The skin's ini file is divided into several parts. All the general settings are put under the [Rainmeter] section, details about the are placed in the [Metadata] section, and the variables in the [Variables] section. Then follow the measures (which collect data) and meters (which display data). While it is not necessary to place the sections in this order, it is the convention that is observed by the vast majority of skin authors.
Note: While you can put sections in any order you wish, it is important to understand that Rainmeter reads and executes measures and meters in the order they are in the skin .ini file. This is important in particular for positioning of meters relative to each other.
The [Rainmeter] section of a skin defines skin-wide options.
ImageCrop=X, Y, W, H, Origin. Origin is optional and can be set to one of the following:
BackgroundMargins=10,10,10,10DragMargins=0,-100,0,0[Rainmeter] LocalFont=#CURRENTPATH#\TheSaBdCp.ttf [SomeMeter] Meter=STRING FontFace=TheSansBold-CapsBe aware that the filename of a font is almost never the same as the fontface name used in the
FontFace= statement. It is the skin author's repsonsibility to ensure the correct FontFace name is used. Details on using fonts with Rainmeter can be found at A Note on Fonts.
This section contains information about the skin itself. Alone, metadata is useful as a consistent and reliable place to learn about a skin, and how it is meant to be used and configured. Metadata is also displayed in the Manage dialog.
It is important for all metadata to be written in the [Metadata] section using a specific set of keys. As a skin developer, you should provide appropriate values for all of these keys.
The variables are keywords that are replaced in other settings. These can be used, e.g., to gather user defined values to the top of the config-file so that they can be easily changed. To define a variable, you must set a value for it in the [Variables] section of a skin or @Include file. To use a variable in a meter or measure, just surround the keyword with # characters.
Variables are defined as follows under the [Variables] section:
VariableName=Value
The variable can then be referred in measures and meters as:
#VariableName#
So to set a variable for the size of the font you want to use on all your meters you might use:
[Variables] Size=11 [SomeMeter] FontSize=#Size# [SomeMeter2] FontSize=#Size#
You can also tell Rainmeter to use the literal text of the keyword by adding asterisks inside the tag, as follows:
#*VariableName*#
This can be used e.g. in a bang to set the text of a String meter. Instead of only using the value of the variable at the time of the bang, this will send the keyword itself, and the receiving meter will update accordingly.
Note: There are several pre-defined variables you can use anywhere in Rainmeter.
Allows users on Windows Vista or Windows 7 to enable "Aero" blur effects on skins. The Windows desktop background behind a skin with some level of transparency set will be "blurred". This effect uses the built-in Windows Aero effects, including changing colors to match your personalization settings for the Windows theme color.
Users on Windows XP or those with Aero or transparency in Aero turned off will see no effect from this functionality. These options must be in the [Rainmeter] section of the skin.
BlurRegion=TYPE, TOPx, TOPy, BOTTOMx, BOTTOMy (,RADIUS)BlurRegion=1,#MyVar1#,#MyVar2#,(10 + 10),(#SCREENAREAHEIGHT# - 30)By setting DynamicVariables=1 in a measure or meter, variables that have had their values changed by the "!SetVariable" !bang can be read by that measure or meter. Additionally, if dynamic variables are turned on, a measure's name can be used as a variable to use its current value elsewhere. Measure values are encased by [square brackets]. Dynamic Variables can be used in any measure or meter, but not in the [Rainmeter] or [Variables] sections.
Note: There is also currently no support for Dynamic Variables in plugins, such as WebParser or QuotePlugin.
Example:
[Rainmeter] Update=1000 [Variables] Width=100 [MeasureCalc] Measure=Calc Formula=Counter%100 [Square1] Meter=Image SolidColor=255,0,0 W=#Width# H=50 MouseOverAction=!SetVariable Width 200 DynamicVariables=1 [Square2] Meter=Image SolidColor=0,0,255 W=[MeasureCalc] H=50 Y=R DynamicVariables=1
In this example, Square1 would show a red 100x50 pixel box. When the mouse is place over the box, it grows to 200x50 as the variable is changed. Square2 shows a blue box that is 50 pixels tall and continuously grows from 0 to 100 pixels wide as it gets its width from the value of MeasureCalc.
Loads an external file in the .ini format so an author can have skin, config, suite or Rainmeter-wide variables, or even shared measures. The loaded file is treated as if the contents were included in the actual skin .ini file. The path used is relative to the current .ini file.
The @include statement must be used under some section (i.e. it cannot be the first thing in the file). Most often it is used in the [Variables] section of a skin, to allow sharing of common variables between skins. If there are multiple included files within the same section of the .ini file, each @include statement should be numbered as follows:
@include1=... @include2=... @include3=...Remember that since the included file is being treated as part of the .ini file, it must also have the proper .ini formatting (i.e.
[section] parameter=value). If the included file is not itself a fully working skin, then it should not use the .ini extension. Doing so may cause issues with Rainmeter's context menu, as well as some third-party applications. A common alternative is the .inc extension
The included file is read at the position where the @include is defined so the values from the included file with the same name as those from the .ini file will overwrite the values from previous sections and vice versa.
Note: You may use a variable as the name of an @include file, but not a dynamic variable.
Example:
IncludeFile.inc:
[Variables] Color=255,255,255,255
[Variables] Font=Arial @Include=IncludeFile.inc [SomeMeter] FontFace=#Font# FontColor=#Color#
Measures and meters can be categorized into groups. To add a measure or meter to a group, simply add the Group= statement to the section. Any number of groups may be added to a section, all of which must be separated by a vertical bar (i.e. "|"). These groups can then be controlled through a variety of bangs.
[MeterCPUText] Meter=String MeasureName=MeasureCPU Group=CPU | Strings [MeterCPUBar] Meter=Bar MeasureName=MeasureCPU Group=CPU | BarsMeters in the CPU group, for example, can be hidden as follows:
!HideMeterGroup CPU
Measures are sections that determine what information Rainmeter should retrieve. Within a .ini file, names for measures must be unique and they must not have spaces. The meters use these section names to bind to the measures and display the results.
Note: Some meters require a range of values (BAR, HISTOGRAM, etc) so that they can display the measured value as relative to the minimum and maximum values. Not all measures are able to calculate the minimum and maximum value automatically so you need to do that manually with MinValue and MaxValue.
These general settings apply to all measure types.
Update=1000 and UpdateDivider=30, the measure is updated every 30 seconds. The default value is 1. A setting of -1 will disable ongoing updates for the measure, so it will only be executed once on
load or refresh.Substitute="cat":"dog" would change all "cat" to "dogs" in the measured value.Substitute='"':"" would remove all quotes from the text.Substitute='"':"None" will replace a quote with the word None. Substitute="None":'"' will replace the word None with a quote. However, Substitute='"':'None' will fail, as you can't use single quotes on both sides of the "find:replace" pairs. An easier to read example is Substitute='red':'blue', which will fail."\d\d":"It Works","^..":"This""^(\d{1,3}).(\d{1,3}).(\d{1,3}).\d{1,3}$":"\1.\2.\3.***""^(.{10,}).+$":"\1..."AverageSize=10, the
returned value is the average of last ten values.Measure IfActions are commands you add to a measure to have Rainmeter take some action
when a defined "above/equal/below" threshold value is returned by the measure. You can have Rainmeter run
a built-in !Bang, several !Bangs at once, or even execute some external command.
How an action is formatted
varies somewhat depending on which !Bang is being used, or what an external application expects. The rules can
be found at the Bangs page.
The Calc measure is used to calculate formulas.
UpdateRandom=1 a new random number is set on each update cycle. When UpdateRandom=0 a random number is set on refresh.<condition> ? <expr. if true.> : <expr. if false.>This will evaluate condition as being either true or false. If it is true, the expression to the left of the colon (:) is evaluated. If it is false, the expression to the right is evaluated. This is equivalent to the following if-then-else statement:
RANDOM returns a random number between the values of "LowBound"
and "HighBound" defined in the measure.
Returns the percentage used of the entire CPU or individual cores.
FreeDiskSpace returns usage statistics for the selected drive.
IgnoreRemovable=0 if you want to measure a USB drive.Measures the amount of virtual memory free in bytes. Virtual memory is equal to Pagefile + RAM + RAM.
Measures various types of network traffic.
Measures incoming network traffic.
Measures outgoing network traffic.
Measures total network traffic.
Measures the amount of physical RAM memory free in bytes.
A plugin in Rainmeter is a dynamic link library (.dll) program specifically written to provide additional functionality not built into Rainmeter. A plugin is used in Rainmeter with the specific measure type Measure=Plugin. Each plugin in turn has its own settings that must be placed in this section. See Plugins to learn more on the plugins included with Rainmeter and what settings are required for each.
You may also use a 3rd-party plugin developed for Rainmeter but not included with the installation. Simply place the new plugin .dll file into the Plugins folder under the location of your Rainmeter.exe and the new plugin can be used like any of the default ones. Note: Be sure that the 3rd-party plugin you add was compiled for the same architecture version of Rainmeter (32bit or 64bit) as the version you are using. You may not use a 32bit plugin with 64bit Rainmeter or a 64bit plugin with 32bit Rainmeter.
Plugin=Plugins\WebParser.dll).Provides a way to read data from the Windows Registry.
If you open Regedit.exe to the location you are trying to read, you will notice the second column in the right pane is called "Type". There are several different types, but the two most common - and the two supported by Rainmeter - are REG_SZ and REG_DWORD. If the value is of type REG_SZ it means it is a string. If it is REG_DWORD it is a number. Many of Rainmeter's meter types require a number as input rather than a string. This means that if the value you are trying to read is of type REG_SZ, meters like Line, Histogram, Bar, etc. will not recognize the value. Even if the value is entirely numeric, it will still be read as a string.
Numeric string values from the registry can be used as a number if you convert them with a Measure=Calc.
[MeasureRegistry] Measure=Registry ... [MeasureStringToNum] Measure=Calc Formula=[MeasureRegistry] MinValue=0 MaxValue=100 DynamicVariables=1
The Script measure allows the execution of Lua (a scripting lanague) code. The Lua script can be used to retrieve the values of measures, send bangs, and more. A Lua script can do programming that would be difficult or impossible in native Rainmeter code, and can return values or change settings in the Rainmeter skin.
The Script measure can be controlled with the !CommandMeasure bang. The argument must be valid Lua code and will be executed in the context of ScriptFile.
A full explanation of how to use this measure type with the Lua scripting language can be found at Lua Scripting. This guide should be carefully read before creating a skin using the Script measure.
Measures the amount of virtual (swap) memory free in bytes.
Measures the current time/date.
Format="%H:%M:%S").TimeZone=+2.0). You can use also fractional values. If
this is not given the local time is used.Full details on Time/Date formatting codes can be found at msdn.microsoft.com.
%a - Abbreviated weekday nameReturns the amount of time since the last restart of the computer.
Format="%4!i!d %3!i!:%2!02i!".Format statement, %3 (hours) will be incremented by days * 24. To disable this, set AddDaysToHours to 0 (default 1).Meters are the sections that tell Rainmeter how to display information. Each meter needs to have a unique name, which should be put inside [Square Brackets]. It does not matter what the name is as long as there are no spaces and it is not used elsewhere within the same.ini file.
Meters by default are evaluated and displayed in the order they are in the skin .ini file. Settings like W= and H= and X= and Y= can be used to size and position meters in the context of the skin containng them. So a meter with a setting of X=0 will be positioned 0 pixels from the left edge of the skin it is in. If you drag the entire skin to another location, the meter will remain positioned 0 pixels from the left edge of the skin, irregardless of where the skin is on the screen.
There are many different types of supported meter types in Rainmeter. The manual pages for each describe them in detail, with settings specific to each type.
The following are setting which apply to all meter types.
Y=(300/3)).SolidColor=255,0,0,128), or in hexadecimal format (e.g. SolidColor=FF000080). If it is not set, the background is completely transparent.Rainmeter uses colors in the settings of many different meters.
Color codes in Rainmeter are based on RGBA, which stands for red, green, blue, and alpha. The values can be entered either using a set of four numbers ranging from 0 to 255 in either decimal or hexadecimal form. You may leave off the alpha value, and Rainmeter will default to 255 / FF, or fully opaque.
SolidColor=RRR,GGG,BBB,AAASolidColor=RRGGBBAANote: If you use an alpha of 0, then the element using the color will not only be invisible, but will not be seen by Rainmeter at all for the purpose of mouse actions. If you want a meter to be invisible but still seen by Rainmeter, use an alpha of 1.
A online color picking tool which will provide the RGB and HEX codes for a color can be found at Rainmeter Color Picker.
Solid opaque red is 255,0,0,255 or FF0000FF
Solid opaque blue is 0,0,255,255 or 0000FFFF
Solid opaque grey is 128,128,128,255 or 808080FF
Half-transparent green is 0,255,0,128 or 00FF0080
MeterStyles allow CSS-like common "styles" for meters. This allows you to centralize common parameters for meter into a single section. Using the MeterStyle option will essentially cause the specific meter to inherit all applicable properties from the given style. A style is just another section (it can even be a meter). Multiple styles can be used by separating them with a pipe (i.e. Style1 | Style2 | ...).
Note: You may not "daisy chain" MeterStyles. In other words although a meter may be used as a MeterStyle for another meter, that second one may not be used as a MeterStyle for a third.
Fonts are used in String meters through the FontFace option. Fonts can either be installed directly into Windows (allowing the font to be available to all installed programs) or you can use the LocalFont option (under the [Rainmeter] section) to restrict the font to Rainmeter only (and not require a separate install).
Install the font by right clicking it and selecting "Install Font". This will install the font in Windows\Fonts and it will be available in Rainmter and all other Windows applications.
Note: Rainmeter must be restarted after installing fonts in order for Rainmeter to detect the change.
Use the font with the Family Name in a Meter=STRING meter.
[MeterName] Meter=String FontFace=MyInstalledFont
Place the actual .ttf font file in a folder. Use the LocalFont="Path\FileName.ttf" option in the [Rainmeter] section of your skin. Then use the Family Name in FontFace=xxx as normal.
Note: You may use more than one LocalFont in [Rainmeter] by simply adding a number: LocalFont2, LocalFont3, ...
[Rainmeter] LocalFont="#CURRENTPATH#SomeFont.ttf [MeterName] Meter=String FontFace=MyLocalFont
This creates a ToolTip which appears when you hover the mouse over the meter. You must be careful not to overlap two meters with ToolTips as both will be displayed if the mouse is over both at the same time.
DynamicVariables=1 is set. If you wish to spread the text across multiple lines, add the built-in variable #CRLF# at the point you want a line break. This setting must be defined to use a ToolTip.TransformationMatrix=1;0;0;1;0;0). The values a;b;c;d;e;f correspond to the following matrix:
|a c e| |b d f|In short, the values have the following effects:
|-1 0 2x| |-1 0 40| | 0 1 0 | = | 0 1 0 | TransformationMatrix=-1;0;0;1;40;0
|1 0 0 | |1 0 0 | |0 -1 2*y| = |0 -1 100| TransformationMatrix=1;0;0;-1;0;100
|0.5 0 0.5*x| |0.5 0 25| |0 1 0 | = |0 1 0 | TransformationMatrix=0.5;0;0;1;25;0
Note: All transformations are relative to the top left corner of the window and not to the meter itself. So if you want to rotate the meter by its center the translation component in the matrix must be relative to the top left corner of the window.
Also note that the even if the meter's visual location and orientation is changed by the transformation the place where it would be located without the transformation will still be used to define the window size and register the mouse clicks. This might change in the future though.
Bar meters display the value of a measure in a single vertical or
horizontal bar. The amount the bar is filled corresponds to the relative value
of the measure. Bar graphs require that the measure being used is from 0.0 to 1.0 or
has both MaxValue and MinValue set.
Changes to the bitmap are applied in the following order: ImageCrop -> GreyScale -> ImageTint -> ImageFlip -> ImageRotate.
ImageCrop=X, Y, W, H, Origin. Origin is optional and can be set to one of the following:
ColorMatrix1=1; 0; 0; 0; 0 ColorMatrix2=0; 1; 0; 0; 0 ColorMatrix3=0; 0; 1; 0; 0 ColorMatrix4=0; 0; 0; 1; 0 ColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (ColorMatrix5) determining offset values that are added directly to the color. (ex: ColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
The Bitmap meter takes an image and divides it into equally-sized frames. Each frame is shown as the relative value of the measure attached to it reaches the relative position of the pieces. For example, if the image a strip of 5 images, when the measure is between 0% and 19% the first frame is shown, from 20 to 39% the second frame is show, and so on. Bitmaps are often used with counters to display animations, or are used to show stylized numbers.
Changes to the bitmap are applied in the following order: GreyScale -> ImageTint -> ImageFlip.
ColorMatrix1=1; 0; 0; 0; 0 ColorMatrix2=0; 1; 0; 0; 0 ColorMatrix3=0; 0; 1; 0; 0 ColorMatrix4=0; 0; 0; 1; 0 ColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (ColorMatrix5) determining offset values that are added directly to the color. (ex: ColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
The button meter cannot be bound to any measure. Its entire purpose is to make the creation of buttons easier. A button can display a normal, clicked and hover state of an image and perform an action automatically.
Changes to the button image are applied in the following order: GreyScale -> ImageTint -> ImageFlip.
ColorMatrix1=1; 0; 0; 0; 0 ColorMatrix2=0; 1; 0; 0; 0 ColorMatrix3=0; 0; 1; 0; 0 ColorMatrix4=0; 0; 0; 1; 0 ColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (ColorMatrix5) determining offset values that are added directly to the color. (ex: ColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
Histograms display values using vertical bars - once per update - on a
graph. They require that the measure being used ranges from 0.0 to 1.0 or has both
MaxValue and MinValue set.
Changes to the images are applied in the following order: ImageCrop -> GreyScale -> ImageTint -> ImageFlip -> ImageRotate.
PrimaryImageCrop=X, Y, W, H, Origin. Origin is optional and can be set to one of the following:
PrimaryColorMatrix1=1; 0; 0; 0; 0 PrimaryColorMatrix2=0; 1; 0; 0; 0 PrimaryColorMatrix3=0; 0; 1; 0; 0 PrimaryColorMatrix4=0; 0; 0; 1; 0 PrimaryColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (PrimaryColorMatrix5) determining offset values that are added directly to the color. (ex: PrimaryColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
The Image meter is used to show images. It does not necessarily need to
be tied to a measure and is often used just to display a specific image for
aesthetic purposes. However, when used with a measure, it will try to display
the image whose filename corresponds to the value of the measure.
Changes to the image are done by applied in the following order: ImageCrop -> GreyScale -> ImageTint -> ImageFlip -> ImageRotate.
Meter=IMAGE MeasureName=SomeMeasure MeasureName2=SomeMeasure2 ImageName=%1-%2.pngIf ImageName is not specified, the value of MeasureName appended with the .png extension is used as the image.
PreserveAspectRatio=0, and it will scale the image to the exact specified size. Aspect ratio is not preserved.PreserveAspectRatio=1, and the image will be scaled to the given value, with the other undefined "aspect" being automatically scaled to preserve the aspect ratio.PreserveAspectRatio=1, and the image will be scaled by using the larger of the width or height dimensions in the original image, setting that to the user defined value, and setting the other "aspect" to what is needed to preserve the aspect ratio. That way the image will be made to "fit" in the container defined by H and W even if the user doesn't know if the image is originally "portrait" or "landscape" (tall or wide) from the source.ImageCrop=X, Y, W, H, Origin. Origin is optional and can be set to one of the following:
ScaleMargins=10, 50, 10, 50)ColorMatrix1=1; 0; 0; 0; 0 ColorMatrix2=0; 1; 0; 0; 0 ColorMatrix3=0; 0; 1; 0; 0 ColorMatrix4=0; 0; 0; 1; 0 ColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (ColorMatrix5) determining offset values that are added directly to the color. (ex: ColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
The line meter shows the values of a measure as a graph with a line connecting each data point. Any number of lines can be shown depicting as many measures with a single meter, all overlapping. Line meters require that the measure being used is from 0.0 to 1.0 or has both MaxValue and MinValue set.
The rotator meter displays an image that rotates around a point where the
angle of rotation is determined by the measure it is attached to. Rotator meters
require that the measure being used is from 0.0 to 1.0 or has both MaxValue and
MinValue set.
Changes to the image are done by applied in the following order: ImageCrop -> GreyScale -> ImageTint -> ImageFlip -> ImageRotate.
ImageCrop=X, Y, W, H, Origin. Origin is optional and can be set to one of the following:
ColorMatrix1=1; 0; 0; 0; 0 ColorMatrix2=0; 1; 0; 0; 0 ColorMatrix3=0; 0; 1; 0; 0 ColorMatrix4=0; 0; 0; 1; 0 ColorMatrix5=0; 0; 0; 0; 1The values on the main diagonal are, from top-left to bottom-right: Red, Green, Blue, Alpha and a placeholder. The values represent the percentage of of the particular value present in the image, where 0.0 is none and 1.0 is normal. The remaining entries in the matrix allow a color to have its value modified in terms of another color (ex: the value of Red might have half of the Blue value added), with the entries in the final row (ColorMatrix5) determining offset values that are added directly to the color. (ex: ColorMatrix5=0.5; 0; 0; 0; 1 will add 50% to the red value). More information on ColorMatrix is available at ColorMatrix Unleashed.
The roundline meter displays a single line that rotates around a point. The angle of the line is determined by the measure. By default, the minimum position is pointing to the right, the line then moves clockwise until it is pointing to the right again. If the width and height are not defined, the center point is the at the X and Y position of the meter. If width and height are specified, it is in the middle of the bounding box. Roundline meters require that the measure being used is from 0.0 to 1.0 or has both MaxValue and MinValue set.
String meters display the value of measures as text. A string meter does not necessarily need to have a measure attached to it and can just be a static string of text by using Text=. You can mix the results of measures and static text by using Text= combined with %1, %2 etc. to indicate the value of the measures used by the meter. If you are only displaying the result of a single measure, no Text= statement is needed.
A plugin in Rainmeter is a dynamic link library (.dll) program specifically written to provide additional functionality not built into Rainmeter. A plugin is used in Rainmeter with the specific measure type Measure=Plugin. Each plugin in turn has its own settings that must be placed in this section. Click on any of the plugins listed on the right to learn more about the plugins included with Rainmeter and what settings are required for each.
You may also use a 3rd-party plugin developed for Rainmeter but not included with the installation. Simply place the new plugin .dll file into the Plugins folder under the location of your Rainmeter.exe and the new plugin can be used like any of the default ones. Note: Be sure that the 3rd-party plugin you add was compiled for the same architecture version of Rainmeter (32bit or 64bit) as the version you are using. You may not use a 32bit plugin with 64bit Rainmeter or a 64bit plugin with 32bit Rainmeter.
If you are interested in creating a 3rd party plugin for Rainmeter, there are source code templates available for both C++ and C# coders. Further information can be found at Developers.
Plugin=AdvancedCPU
This is similar to using PerfMon to measure the CPU usage except that you can filter out processes or only include some of them.
Plugin=CoreTemp
This plugin can retrieve the values measured by CoreTemp. CoreTemp must be running in the background in order for the plugin to work. A list of supported CPU's is available here.
CoreTempIndex=1. Must be used when returning Temperature, TjMax, and Load.Plugin=FolderInfo
FolderInfo.dll can be used to count files in a folder, their size, and more.
Plugin=InputText
InputText inserts user-supplied text into a one or more bangs. The plugin works by defining a series of commands, which can be triggered by any "action" string (this includes mouse actions, conditional actions in a Calc measure, and other commands in an InputText measure, including the same measure). When triggered, a free-floating text input box is created to gather user input at the specified points in the command series. When all input has been submitted, the commands are carried out.
CommandN=[Command Before Input]$UserInput$[CommandAfterInput] [MeasureKey]="[Value]"LeftMouseUpAction=!CommandMeasure "MeasureInputTextPlugin" "ExecuteBatch ALL X=100" IfAboveAction=!CommandMeasure "MeasureInputTextPlugin" "ExecuteBatch 3" Command4=!CommandMeasure "MeasureInputTextPlugin" "ExecuteBatch 2-4 Password=1"
Plugin=iTunesPlugin
This plugin can be used to remote control iTunes and get information from it.
Note: New skins should use the NowPlaying plugin as it supports multiple media players (including iTunes).
Command=GetCurrentTrackArtwork.iTunes can be controlled through !CommandMeasure statements. You can either one of the following methods.
!CommandMeasure "MeasureName" ""!CommandMeasure "AnyiTunesMeasure" "NextTrack"The example skin below demonstrates both methods.
Example SkinPlugin=NowPlaying
The NowPlaying plugin is used to control various media players and retrieve track metadata (including album art) from them.
IMPORTANT: This plugin uses the the concept of 'main' and 'secondary' measures. To understand the difference, refer to the example skin at the end of this page.
PlayerName=Winamp
Secondary measure(s): PlayerName=[MainMeasureName]The media player can be controlled with !CommandMeasure statements. See the sample example skin below for usage.
SetPosition 50 to jump to 50% of the track) or a relative value (SetPosition +5 to jump 5% forward or SetPosition -10 to jump 10% backward).0 (no rating) and 5 (maximum rating).1 (shuffle on), 0 (shuffle off), or -1 (toggle shuffle).1 (repeat on), 0 (repeat off), or -1 (toggle repeat).SetVolume 50 to set volume to 50%) or a relative value (SetVolume +20 to increase volume by 20% orSetVolume -40 to decrease volume by 40%).This list contains all supported media players in the latest beta version of Rainmeter. Note that using an unsupported type or bang is perfectly safe (it will simply result in in a empty value or no action, respectively).
PlayerName=AIMPPlayerName=CADPlayerName=iTunesPlayerName=CADPlayerName=CADPlayerName=WLMPlayerName=MediaMonkeyPlayerName=WLMPlayerName=CADPlayerName=WLMPlayerName=SpotifyPlayerName=WLMPlayerName=WinampPlayerName=CADPlayerName=WMPPlayerName=WLMIn addition to the players listed above, the NowPlaying plugin may support other players through supported interfaces. You may want to give the following interfaces a try.
PlayerName=CADPlayerName=WinampPlayerName=WLMIf none of these work, leave a suggestion in this thread. If you're nice enough, support for your player will be added shortly after your message :-)
Plugin=PerfMon
Use Window's Performance Monitor to find out the valid values for these settings. There are a great many counters which Windows tracks in Performance Monitor. From the Start Menu, type "Perfmon.msc" to run the tool and find the counters you wish to measure.
Note: The names of the objects, counters and instances need to be in English even in localized versions of Windows.
Plugin=PingPlugin
This plugin can be used to send ping packets to a server and measure the network latency.
Plugin=MediaKey
The MediaKey plugin allows you to send various keystrokes found on multimedia keyboards. It has been tested to work with Spotify, Zune, foobar, and Windows Media Player.
[MeasureMediaKey] Measure=Plugin Plugin=MediaKey
The plugin is controlled via !CommandMeasure statements sent to its measure. E.g.:
!CommandMeasure "MeasureMediaKey" "NextTrack"
Valid arguments are:
Plugin=PowerPlugin
This plugin can be used to measure battery status and the current MHz on laptops. Note that not all laptops support this (or all the values).
PowerState=LIFETIME.Plugin=Process
Detects if a defined Windows process or application is currently running.
ProcessName=Firefox.exeReturns values of -1 (not running) or 1 (running).
Note: This can not be used to detect if a Windows "service" executable is running, as those processes are run inside of the "svchost.exe" process.
Plugin=QuotePlugin
This plugin has two different uses: it can display a random string from a text file or it can select a random file from a folder which can be displayed with the IMAGE meter (if it's an image that is).
FileFilter=*.jpg;*.gif).Plugin=RecycleManager
This plugin can be used to check the size and count of the files in the recycle bin.
Drives=ALL.Drives=A:|C:|D: will give the sum of these drives.The following bangs can also be sent to any RecyleManager measure:
Plugin=ResMon
Requires Windows XP with Service Pack 1 or newer. The plugin was originally made by Daedalus.
ProcessName=Rainmeter.exe would measure only Rainmeter's resources. Leave this empty if you want to measure all resources in the system. This has no effect if the ResCountType=WINDOW.Plugin=SpeedFanPlugin
This plugin can read the values measured by SpeedFan. You need to have SpeedFan running for this plugin to work since it doesn't do any measuring itself.
SpeedFanNumber=1.Plugin=SysInfo
This plugin returns various information about your system.
Plugin=VirtualDesktops
A virtual desktop manager (VDM) allows you to distribute programs across multiple desktops. The VirtualDesktops plugin gives access to information from different VDMs for Windows and can be used to trigger desktop switches.
VDMeasureType=DesktopCount. Can be set to either X or Y to return the number of columns or rows, respectively, in a desktop grid layout.[CurrentDesktop] Measure=Plugin Plugin=VirtualDesktops VDManager=VirtuaWin VDMeasureType=CurrentDesktop [DesktopCountX] Measure=Plugin Plugin=VirtualDesktops VDManager=VirtuaWin VDMeasureType=DesktopCount> VDDesktopCount=X [SwitchDesktop] Measure=Plugin Plugin=VirtualDesktops VDManager=Dexpot VDMeasureType=SwitchDesktopBangs:
!CommandMeasure "SwitchDesktop" "2"VDManager=DexpotVDMeasureType=VDMActive.VDMeasureType=VDMActive.VDMeasureType=CurrentDesktop) or number of desktops (used with VDMeasureType=DesktopCount) changes.!Refresh "#CURRENTCONFIG#" instead of just !Refresh, for example).VDMeasureType:VDMeasureType=Screenshot:Example:
[Screenshot] Measure=Plugin Plugin=VirtualDesktops VDManager=Dexpot VDMeasureType=Screenshot VDDesktop=1 VDOutputFile=#CURRENTPATH#Desktop1.bmp VDWidth=320 [DexpotCommand] Measure=Plugin Plugin=VirtualDesktops VDManager=Dexpot VDMeasureType=Command
Bangs:
!CommandMeasure "DexpotCommand" "-next" !CommandMeasure "DexpotCommand" "-prev" !CommandMeasure "DexpotCommand" "-V" !CommandMeasure "DexpotCommand" "-d"
Plugin=WebParser
WebParser reads information from webpages. The plugin uses Regular Expressions to parse the web page which allows it to extract information pretty much from any page. The plugin can be used e.g. to get the current TV shows, weather conditions, stock exchange values, news and basically anything that is on the net. The negative side is that the regular expressions might look rather complex especially if you're not familiar with programming languages (and even if you are :-).
More information and examples for WebParser can be found at WebParser Primer and RSS Skin Tutorial.
Url=[MeasureExample]Url=file://C:\path\file.ext.Substitute= statement to translate character references like ", &, <, > to the actual character.
[WebParserMeasure] Debug2File="C:\filename.txt" Debug=2 [WebParserMeasure2] ; Saves to current skin folder Debug2File="Debug2File.txt" Debug=2Notes:
Examples:
Retrieve the title and first item from Slashdot's RSS feed.
[MeasureRSSTitle] Measure=Plugin Plugin=WebParser UpdateRate=3600 Url=http://slashdot.org/slashdot.rdf RegExp="(?siU)<title>(.+)</title>(.+)<item(.+)<title>(.+)</title>" StringIndex=1 FinishAction=!Redraw [MeasureRSS] Measure=Plugin Plugin=WebParser Url=[MeasureRSSTitle] StringIndex=4 Substitute="&":"&"
Download the current weather map from Finnish Meteorological Institute.
[MeasureDL] Measure=Plugin Plugin=WebParser UpdateRate=1800 Url=http://www.fmi.fi/saa/sadejapi_5.html?selected=7 RegExp="(?siU)ennuste" SRC=\"(.*)\"></TD>" FinishAction=!Redraw StringIndex=1 Download=1 [MeterImage] Meter=IMAGE MeasureName=MeasureDL X=0 Y=0 W=400 H=300
Plugin=WiFiStatus
The WiFiStatus plugin can be used to display various attributes of visible wireless networks in your area. Windows XP SP2 users need to install the KB918977 hotfix.
WiFiIntfID=0) unless you have more than 1 wireless interface adapter (this may or may not include bluetooth/infrared receivers). If you do not get any response from the measure with this value at 0, then try other values starting from 1, then 2 and so on...[MeasureSSID] Measure=Plugin Plugin=WiFiStatus WiFiInfoType=SSID WiFiIntfID=0 [MeasureNetworks] Measure=Plugin Plugin=WiFiStatus WiFiInfoType=LIST WiFiIntfID=0 WiFiListStyle=3
A more detailed sample and support is available at the WiFiStatus support thread.
Plugin=Win7AudioPlugin
Controls sound device and volume for Windows Vista and newer. Previous versions of Windows are not supported. This plugin has been written by Reiswaffel.
[MeasureWin7Audio] Measure=Plugin Plugin=Win7AudioPlugin
Returns the name of the current sound device (when used in a STRING meter) and the percentage (0-100) of current volume level (when used in a measure which requires a number).
The current device and volume is controlled with !CommandMeasure statements sent to the plugin. See the sample .ini below for examples.
Plugin=WindowMessagePlugin
This plugin can be used to send and receive information from other applications. It can send window messages to other applications and show the result. The plugin can be used for example to control WinAmp or some similar media players.
Messages can also be sent on demand with the !CommandMeasure bang. The arguments are similar that of the WindowMessage option.
!CommandMeasure "MeasureName" "SendMessage Msg wParam lParam"
Examples:
This returns the name of the song that is playing in WinAmp.
[MeasureWinamp] Measure=Plugin Plugin=WindowMessagePlugin WindowClass=Winamp v1.x Substitute="[Paused]":""," - Winamp":""
Check if Winamp is playing, or not. This returns 0 if it's not playing, 1 if it is playing and 3 if it's paused.
[MeasureWinampPlaying] Measure=Plugin Plugin=WindowMessagePlugin WindowClass=Winamp v1.x WindowMessage=1024 0 104
Show song progress. The [MeasureWinampDuration] will return the current song position as a value between 0 and 1. You can use for example the BAR-meter to display the value.
[MeasureWinampFull] Measure=Plugin Plugin=WindowMessagePlugin WindowClass=Winamp v1.x WindowMessage=1024 1 105 [MeasureWinampCurr] Measure=Plugin Plugin=WindowMessagePlugin WindowClass=Winamp v1.x WindowMessage=1024 0 105 [MeasureWinampDuration] Measure=Calc Formula=(MeasureWinampCurr<=0)?0:(MeasureWinampCurr/(MeasureWinampFull*1000+1))
Mouse actions are commands you add to a meter or the [Rainmeter] section to execute an action on a specific mouse event.
Note: When using a mouse action on a string meter or image meter with transparency, you must click exactly on the meter text or image, as the transparent areas do not react to clicks. This can be solved by adding SolidColor=0,0,0,1 to the meter, which will create an near-invisible but solid background behind the meter element.
Also note that actions defined for the meter will override actions defined in the [Rainmeter] section.
MouseActionCursor=0
in the [Rainmeter] section of the skin. This can then be overridden on a meter by meter basis with MouseActionCursor=1.MouseActionCursor=0 on the foreground meter (even if it does not have a mouse action).Rainmeter can also be controlled with !Bang-commands. A bang is a special command that can be executed to change something in the application. You can use the bangs in the various actions that Rainmeter has, or run from them from the command line by giving it as an argument for Rainmeter.exe.
LeftMouseUpAction=!RefreshLeftMouseUpAction=!Execute [!ResetStats][!Refresh]LeftMouseUpAction=!Execute ["C:\Windows\Notepad.exe" "FileToOpen.txt"]LeftMouseUpAction=!Execute [!SetVariable "SomeVariable" """A "B" C"""]LeftMouseUpAction=!Execute [!SetVariable "SomeVariable" "A "B" C"]Note that the [] means that you must supply the argument for the bang (do not include the []-chars). The () means that the argument is optional.
Most !bangs take also the config as an optional parameter. If the config is defined the bang only applies to that particular config. If it's not given, the !bang is sent to the current (in a skin) or first (from the command line) config. Use * as the config's name to send it to all configs.
Actions for the Rainmeter application
!Refresh * is that the skins folder is rescanned.Actions for variables and settings in skins or groups of skins
!SetVariable VarName "(#SCREENAREAWIDTH# - 10)"Actions for a skin or group of skins
FadeDuration= setting for the skin in Rainmeter.ini.FadeDuration= setting for the skin in Rainmeter.ini.Actions for a meter or group of meters
Actions for a measure or group of measures
Rainmeter, nor anyone associated with Rainmeter, is responsible for teaching you the Lua scripting language. This guide is only meant to help with using Lua with Rainmeter. However, Lua is a relatively simple language, and there are many good sites where you can learn Lua itself:
http://www.lua.org/manual/5.1/
http://lua-users.org/wiki/LuaTutorial
Or a really good book for sale:
Programming Lua Second Edition
A Lua scripting language file (.lua) can be executed by Rainmeter, passing settings from Rainmeter to the script. The script can then be used to read Rainmeter measures and meters from the calling skin, do any kind of processing outside of Rainmeter that you like, and take various actions that impact the Rainmeter skin:
Rainmeter has the Lua 5.1 codebase embedded. It contains all the standard libraries and functions that come with Lua, but currently cannot be extended by using external libraries like LuaCURL in your code or "including" external script files using "dofile". This is due both to the need to protect the Rainmeter core in memory, and to limitations of Lua external libraries in a 32bit / 64bit environment. Improvements to this may come at a later date.
Lua is integrated with Rainmeter using the new Rainmeter Measure=Script measure type:
[MeasureLuaScript] Measure=Script ScriptFile=MyScript.lua MySetting="SomeSetting" UpdateDivider=30
ScriptFile= This is the required name of the .lua file you will be executing.
MySetting= This is just a sample to show how you can pass information to the Lua script from Rainmeter when it is run. This can be any key name and any value, and you can have none, or as many as you like.
UpdateDivider= This optionally tells Rainmeter how often to execute the script, as with any other Rainmeter measure.
There are three functions in a .lua script file written for Rainmeter that control the overall interaction with Rainmeter:
PROPERTIESPROPERTIES =
{
MyTextSetting = "";
MyNumberSetting = 0;
}
You can then later use these settings in your script, with PROPERTIES.MyTextSetting for example, a standard Lua way of reference a table index by value. Remember that Lua is always "case sensitive". This table is PROPERTIES, not Properties.
function Initialize()
Measure1 = SKIN:GetMeasure("SomeMeasure")
Meter1 = SKIN:GetMeter("SomeMeter")
CurrentMeter1Height = Meter1:GetH()
Meter1:Hide()
MyNewVar = PROPERTIES.MyTextSetting
MyNewTable = {}
end
return 99 - MeasureScript will have a numerical value of 99 (e.g. when used in Calc measures) and a textual value of "99" (e.g. when used as the MeasureName in STRING meters)return "99" - MeasureScript will have a numerical value of 99 and a textual value of "99"return "Ninety Nine" - MeasureScript will have a textual value of "Ninety Nine"function Update() SomeNewVar = "Hello World" SKIN:Bang(!SetVariable MyVar "..SomeNewVar) NewReturnValue = 99 return NewReturnValue end
Simple Example:
Skin:[Rainmeter] Update=1000 [MeasureLuaScript] Measure=Script ScriptFile="#CURRENTPATH#LuaSample.lua" SettingInSkin=20 [MeterLua] Meter=String MeasureName=MeasureLuaScript FontSize=12 FontColor=255,255,255,255
PROPERTIES =
{
SettingInSkin = 0;
}
function Initialize()
CurrentNumber = tonumber(PROPERTIES.SettingInSkin)
end
function Update()
NewNumber = CurrentNumber + 50
return NewNumber
end
The measure [MeasureLuaScript] in the skin will have a string value of "70", which can be used in any calc or meter.
There are several Rainmeter-specific functions exposed to Lua. Functions may return a string (e.g. "example"), a number (e.g. 42), a boolean value (i.e. true or false), or nothing (marked by void).
print()print("Script just ran!")These functions can be used on used with the SKIN: prefix. For example:
meter = SKIN:GetMeter("ExampleMeter")
SKIN:Bang("!Refresh")
These functions can be used on meter objects returned by the SKIN:GetMeter() call. For example:
anyMeter = SKIN:GetMeter("ExampleMeter")
anyMeter:SetX(25)
These functions can be used on objects returned by the SKIN:GetMeasure() call. For example:
anyMeasure = SKIN:GetMeasure("ExampleMeasure")
anyMeasure:Disable()
These are functions that should not be used. They are supported for now and may be removed in the future.
tolua.cast - Simply use SKIN:GetMeter() by itself
TO.LuaLog() - Use print() insteadmeter:SetText() - Prefer SKIN:Bang('!SetOption "MeterName" "Text" "Value"') insteadfunction GetValue() and function GetStringValue() when used to return a value to the skin - Return number or string in Update() insteadThe !CommandMeasure bang can be used to execute Lua code in Rainmeter.
LeftMouseUpAction=!Execute [!CommandMeasure "ScriptMeasure" "someVar=5;someVar2=someVar*7;Update()"]-> set variable someVar to 5, set a new variable with a formula, and immediately execute the Update function. (in the context of the ScriptFile specified by ScriptMeasure)
There are some simple skins using the new Lua integration on the Rainmeter forums. Tearing them apart can be the best way to learn how it all fits together:
The Rainmeter skin package (.rmskin) is an increasingly popular method of distributing various Rainmeter components. It allows one-click installation of skins, themes, fonts, and more.
To create a .rmskin package, get the .rmskin template from here, then extract and open the newly created Template folder. It should contain five folders along with a file called Rainstaller.cfg.
To add components to the package, simply copy it into the correct folder.
For example, to include the "MySkins" suite of skins, simply copy the entire Documents\Rainmeter\Skins\MySkins folder from your Rainmeter installation into Template\Skins in the template folders.
You are able to include both 64bit and 32bit in one single .rmskin. If you decide to take advantage of this, you must specify at least MinRainmeterVer=2.0.0.740 into Rainstaller.cfg. Then, create the Template\Plugins\32bit and Template\Plugins\64bit folders and copy the plugin(s) into the appropriate folder.
Template\
- Plugins\
-- 32bit\
--- myplugin.dll
-- 64bit\
--- myplugin.dll
There are three ways to include font(s) in your distribution:
LocalFont=#ROOTCONFIGPATH#Fonts\FontFile.ttf in your skins to use the fonts you have distributed.After you have copied all the necessary files into the correct folders, open any text editor (e.g. notepad) and drag & drop the Template\Rainstaller.cfg file into the text editor. Fill in the obvious (Name, Author, and Version) and save the file. A detailed explanation of the other values is available at the end of this page, be sure to glance through that list.
MinRainmeterVer
Sets the minimum version of Rainmeter required to install. For example, to require that Rainmeter 1.2 r393 or higher is installed, specify MinRainmeterVer=1.2.0.393
The revision numbers are available from from Google Code.
LaunchType and LaunchCommand
These two values are used to either load config(s) or a specific theme after installation.
LaunchType=Theme
LaunchCommand=NameOfThemeLaunchType=Load
LaunchCommand=MySuite\Clock\Clock.iniThe path is relative to the Rainmeter\Skins folder. To open multiple configs, separate each config with a vertical bar (i.e. LaunchCommand=file1.ini|file2.ini|file3.ini).
These are advanced options and you will most likely not need these. Do not use the following, unless you know what they are for.
CompatibilityWithBitMinRainmeterVer=1.3.0.499 to ensure that the user has a sufficient version of Rainstaller installed.32bit or 64bit. Leave blank for both.MinRainmeterVer=1.3.0.417 to ensure that the user has a sufficient version of Rainstaller installed.Merge=1 to merge skins in the package with the users skins. Note that the target system must already have the skin in question installed for Merge to work (set to Merge=2 to ignore this).MinRainmeterVer=1.3.0.427 to ensure that the user has a sufficient version of Rainstaller installed. KeepVar below Rainmeter 1.3 r560 does not support Unicode files or multiple files. For Unicode and multiple file support, use at least MinRainmeterVer=1.3.0.559KeepVar=file1.ini|file2.ini|file3.ini).To use a custom header in Rainstaller, simply create a bitmap named Rainstaller.bmp into the same folder as Rainstaller.cfg. Then create the .rmskin file. When the .rmskin file is opened, Rainstaller will display the custom header instead of the default. The dimensions of the bitmap should be exactly 400x60 pixels.
The .rmskin file is simply a renamed .zip file. So, in order to create a .rmskin file, you'll need to create a .zip file first. To do this, right-click on the Template folder and select Send to -> Compressed (zipped) folder. You will be asked to name the newly created .zip file. Give it the name of your choice and press Enter.
To convert the created .zip file into a .rmskin file, simply change the file extension from .zip to .rmskin. If you don't know how to do this manually, grab and run ExttensionChanger from from here. It will allow you change extensions from .zip to .rmskin and vice versa.
Before sharing the newly created .rmskin with others, you will need to make sure it works properly. Remember to delete the components from your own computer before installing to make sure the files were installed properly. For example, if you know that the .rmskin is going to install a skin called "BestSkinEver", delete "BestSkinEver" from Rainmeter\Skins.
After you have ensured that everything works as intended, you are free to upload and share your .rmskin with others.