Skins
The skins are placed into the "Skins" folder. Each skin must be in its own
subfolder. The actual skin file is a normal .ini file with several sections that
defines the skin's shape and the things it measures and displays. The skin's
subfolder can contain several .ini files, but only one of them can be active at
the any time. This allows you, for example, to supply localized skins or
different variations of some skin.
The skin's ini file is divided into four parts. All the general settings are
put under the [Rainmeter] section and the variables in the [Variables] section.
After the general stuff come the "measures", which do the actual measuring of
values. After the measures comethe "meters", which are visual representations of
the measures. It is possible to bind many meters for one measure. While it is
not necessary to place the sections in this order, it is the convention that is
observed by many skin authors.
[Rainmeter]
Background
Name of the background image. If this is omitted a copy of the desktop is taken
and used as the background for the meters. Pink color (255, 0, 255) can be used
as transparent color. You can use BMPs, JPGs and PNGs (with alpha channel!)
BackgroundMode
Defines the background mode:
- 0 = Image as defined by Background
- 1 = Transparent
- 2 = Solid color
- 3 = Scaled background image
BackgroundMargins
Defines the margins for the background image that are not scaled when the
BackgroundMode is set to 3. eg: BackgroundMargins=10,10,10,10
SolidColor
If the background mode is set to 2, this defines the color of the background.
SolidColor2
If the background mode is set to 2, this defines the second color of the
background for the gradient.
GradientAngle
If the background mode is set to 2, this defines the angle for the color
gradient. The angle is defined in degrees.
BevelType
If the background mode is set to 2, This draws a beveled edge around the solid
background.
- 0 = no bevel
- 1 = raised
- 2 = sunken.
Update
The time between updates for the measures and meters. The value should be given
in milliseconds. The default value is 1000 (ie: once per second).
TransitionUpdate
The update time for the meter transitions. When a transition is active (ie: a
meter which supports transitions is changing its value) the redraw rate of the
window will be set to this value. The value should be given in milliseconds.
The default value is 100.
DynamicWindowSize
If set to 1 the size of the window is calculated during every update. The window
is scaled automatically if necessary.
DragMargins
Defines the area from where the window can be dragged. You need to define 4
values separated with comma. The values define the margin of non-draggable area.
It's also possible to use negative numbers in which case the margin is
calculated from the opposite side. (eg: DragMargins=0, -100, 0, 0)
LeftMouseDownAction
A command or a bang that will be executed when the left mouse button is pressed
down over the Rainmeter's window. Note that this disables dragging.
RightMouseDownAction
A command or a bang that will be executed when the right mouse button is pressed
down over the Rainmeter's window. Note that this disables the context menu.
MiddleMouseDownAction
A command or a bang that will be executed when the middle mouse button is
pressed down over the Rainmeter's window.
LeftMouseUpAction
A command or a bang that will be executed when the left mouse button is released
over the Rainmeter's window.
RightMouseUpAction
A command or a bang that will be executed when the right mouse button is
released over the Rainmeter's window. Note that this disables the context menu.
MiddleMouseUpAction
A command or a bang that will be executed when the middle mouse button is
released over the Rainmeter's window.
LeftMouseDoubleClickAction
A command or a bang that will be executed when the left mouse button is Double Clicked
on the Rainmeter's window. (if this action is missing, LeftMouseDownAction will be executed)
RightMouseDoubleClickAction
A command or a bang that will be executed when the right mouse button is
Double Clicked on the Rainmeter's window. Note that this disables the context menu.
MiddleMouseDoubleClickAction
A command or a bang that will be executed when the middle mouse button is
Double Clicked on the Rainmeter's window.
MouseOverAction
A command or a bang that will be executed when the mouse goes over the Skin or
Meter.
MouseLeaveAction
A command or a bang that will be executed when the mouse leaves the Skin or
Meter.
OnRefreshAction
Executes a command or !bang that is executed when the config is refreshed.
This includes when the config is opened the first time.
Author
The name and email of the author of the skin. The string is displayed in the
about dialog.
AppVersion
The minimum version of Rainmeter that is needed by this skin.
If you specify an AppVersion in your skin, and the version of Rainmeter being
used by the end user is not equal to or greater than the version number in
AppVersion=, The end user will be prompted to upgrade.
It is not necessary to define this if you don't want to, howerver it shoild be
noted that if your skin uses features or settings not available in the version
of Rainmeter the end user is runing, the skin may fail to operate correctly.
AppVersion is a single number that can be calculated like this:
Major * 1000000 + Minor1 * 1000 + Minor2. eg: a value for Rainmeter 0.11.4 would
be 11004 and Rainmeter 1.0 would be 1000000.
LocalFont
Allows a skin author to include fonts with the skin without forcing the end user to install the fonts in \Windows\Fonts.
LocalFont=[path]FilenameOfFont.ttf | .otf
LocalFont2=[path]FilenameOfFont.ttf | .otf
Continue for as many as needed
Example:
[Rainmeter]
LocalFont=#PROGRAMPATH#Fonts\TheSaBdCp.ttf
[MeterName]
Meter=STRING
FontFace=TheSansBold-Caps
Note that while it is suggested that the font reside in
C:\Program Files\Rainmeter\Fonts to reduce duplication of fonts on a user's
system, the font can be in any folder and any valid Windows path can be used
with LocalFont. Also be 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.
[Variables]
The variables are keywords that are replaced in other settings. These
can be used eg: to gather user defined values to the top of the
config-file so that they can be easily changed. To use a variable just
surround the keyword with '#'-chars.
Variables take the form:
VariableName=Value
The variable is then referred to later 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:
FontSize=11
Then in every meter displaying text, you could set the parameter:
FontSize=#FontSize#
All the meters will use the font size of "11", and they can ALL be easily
changed to another size by changing just the variable, rather than changing each
individual meter.
Variables can be used to define folders and executables for later use in commands performing some "action"
PathToWinamp="C:\Program Files\Winamp\Winamp.exe"
They can also be used to set the URL for use in WebParser measures reading from the internet.
GoogleNewsURL="http://news.google.com/rss"
Built-in variables
The following are pre-existing variables whose values are set by the system
and do not need to be defined in the [Variables] section. They many be used
anywhere, including within Rainmeter.ini.
- #CRLF#
- Inserts a line break.
- #PROGRAMDRIVE#
- The drive the program is installed to (eg: C:, \\server\Users\, etc...).
- #PROGRAMPATH#
- The path to the program folder
(eg: C:\Program Files\Rainmeter\).
- #SETTINGSPATH#
- The path to the folder where the settings file
is located (eg: C:\Documents and Settings\{yourname}\Application Data\Rainmeter\)
- #SKINSPATH#
- The path to the skins folder
(eg: C:\Documents and Settings\{yourname}\My Documents\Rainmeter\Skins\)
- #PLUGINSPATH#
- The path to the plugins folder
(eg: C:\Program Files\Rainmeter\Plugins\)
- #ADDONSPATH#
- The path to the addons folder
(C:\Program Files\Rainmeter\Addons\)
- #CURRENTPATH#
- The path to the currently read ini file.
- #CURRENTCONFIG#
- The full ConfigName of the currently loaded
skin. (eg: Enigma\Sidebar)
- #WORKAREAX#
- The X-position of the work area.
- #WORKAREAY#
- The Y-position of the work area.
- #WORKAREAWIDTH#
- The width of the work area.
- #WORKAREAHEIGHT#
- The height of the work area.
- #SCREENAREAWIDTH#
- The width of the display resolution.
- #SCREENAREAHEIGHT#
- The height of the display resolution.
Dynamic Variables
By setting DynamicVariables=1 in a measure or meter, variables that have had their values changed by the "!RainmeterSetVariable" !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] rather that #pound signs#. Dynamic Variables can be used in any measure or meter, but not in the [Rainmeter] or [Variables] sections. There is also currently no support for Dynamic Variables in plugins, such as WebParser or QuotePlugin.
Example:
[Variables]
Width=100
[MeasureCalc]
Measure=Calc
Formula=Counter%100
[Square1]
Meter=Image
SolidColor=255,0,0
W=#Width#
H=50
MouseOverAction=!RainmeterSetVariable Width 200
DynamicVariables=1
[Square2]
Meter=Image
SolidColor=0,0,255
W=[MeasureCalc]
H=50
Y=R
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.
@Include
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 (ie: it cannot be the
first thing in the file). 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=...
etc.
Remember that since the included file is being treated as part of the .ini file,
it must also have the proper .ini formatting (ie: [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. The recommended 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: It's possible to use the variables with the @include but dynamic variables won't work with the @include.
Example:
IncludedFile.inc:
[Variables]
FontColor=255,255,255,255
HostSkin.ini:
[Variables]
FontFace=Arial
@Include=IncludedFile.inc
[Metadata]
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. In addition, addons like RainBrowser can take
advantage of metadata to enable more sophisticated skin management features.
It is important for all metadata to be written in the [Metadata] section using a
specific set of keys. A template is provided below. As a skin developer, you
should provide appropriate values for all of these keys.
[Metadata]
Name=Title | Subtitle
- This is the name and subtitle you wish the skin to be known by.
Config=Root Skin Folder | Subfolders | Current Folder
- This is the config (folder) structure the skin is in.
Description=Point 1 | Point 2 | Point 3
- Your description of the skin and its functionality. Use " | " for linefeeds.
Instructions=Point 1 | Point 2 | Point 3
- Any instructions for the end user. Use " | " for linefeeds.
Version=2.0
- The version of the skin.
Tags=Tag 1 | Tag 2 | Tag 3
- Tags, separated by " | " which are used for categorizing and searching skins.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
- The author's license for the skin.
Variant=1
- Which variant in a folder with multiple .ini files.
Preview=#SKINSPATH#MyConfig\Images\Previews\Preview.png
- Path and name of a preview image used in RainBrowser.