Anatomy of a SkinRainmeter works by running "skins", which are .ini files with Rainmeter statements, organized in "configs", which are Windows folders allowing related skins to be grouped together. Configs and skins are located by default at:
So a common location for a skin might be: A Rainmeter .ini "skin" file is a plain text file. It can be edited with any text editor, the most common being Notepad, which comes with Windows, or other more powerful text editors such as: Notepad++. Word processors such as Microsoft Word or WordPad or other WYSIWYG editors are NOT recommended for editing .ini files, and can cause issues by embedding formatting codes you may not even see. The format of a .ini file is simple. It consists basically of:
Key=Value ;Comment There are several sections / section types which most Rainmeter skins will have: [Rainmeter] We will look at the contents of each type of section below: [Rainmeter]This section is used to set global settings for a skin. Common items are the name of the author, the date the skin was revised on, how often the skin should be "updated" and perhaps global mouse actions. [Rainmeter]
Author=Jeffrey Morley
Update=1000
Update "Update" is set in milliseconds (or 1000th of a second). By default, the setting is "1000" which means all measures will update once a second. So for instance to have the skin only update measures every 10 minutes, you would set this to 10 minutes X 60 seconds X 1000 milliseconds or "Update=600000" This will set the update rate for all measures in your skin. A better method is to leave Update= at 1000 and control individual measures using the "UpdateDivider" and "UpdateRate" statements, which we will cover under "Measures". Just be aware that too low (often) an update rate for many measures can really put a load on your CPU or network, and could be seen as an "attack" if you are checking a web site on the internet. [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. If you are editing or creating a skin, you should provide appropriate values for all of these keys. [Metadata]
Name=Title | Subtitle
Config=Root Skin Folder | Subfolders | Current Folder
Description=Point 1 | Point 2 | Point 3
Instructions=Point 1 | Point 2 | Point 3
Version=
Tags=Tag 1 | Tag 2 | Tag 3
License=
Variant=
Preview=
Example: [Metadata]
Name=Enigma Clock | Big Clock
Config=Enigma | Sidebar | Clock
Description=Large analog clock with the date and your location.
Instructions=Set your Weather Code to show your location.
Version=2.6
Tags=Time | Sidebar | Yahoo! Weather
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Preview=#SKINSPATH#Enigma\Resources\Images\Preview.png
[Variables]The Variables section is used to set "aliases" for items you wish to use over and over in your skin so you don't have to type them in full repeatedly, or to define items (like the URL to a website) so they can be easily found and changed by others using your skin. Variables take the form: The variable is then referred to later in measures and meters as: So to set a variable for the size of the font you want to use on all your meters, you might use: Then in every meter displaying text, you could set the parameter: 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" They can also be used to set the URL for use in WebParser measures reading from the internet. [Measures]Measures are the functional guts of Rainmeter. These are used to measure system statistics, time and date, gather information from web sites, read text files and much more. The built-in measures available in Rainmeter are:
You can also use a third-party "Plugin" in a measure. More on those in a bit. The format of a measure is: [MeasureName] Example: [MeasureCPU]
Measure=Plugin
Plugin=Perfmon.dll
PerfMonObject="Processor"
PerfMonInstance=0
PerfMonCounter="% Processor Time"
PerfMonDifference=1
InvertMeasure=1
UpdateDivider=2
UpdateDivider The format for UpdateDivider is: Using PluginsAnother kind of meaure uses third-party "Plugins" to do the work. This is a valuable part of the Rainmeter architecture, as if allows Rainmeter to be expanded almost endlessly without constant new versions of the core application. There are a variety of plugins which install with the standard Rainmeter package:
The format of a measure using a plugin is similar to any measure, but always uses a couple of standard parameters: There will also be some number of other parameters in the form: See the full Rainmeter manual at Manual - Plugins for information on what these plugins do and all available parameters for each one. The WebParser PluginOne of the commonly used plugins is the "WebParser" plugin. This will allow you to read and "parse" information from a web site on the internet, and use the results in a display meter. WebParser is often used to gather local weather information or display items from an "RSS" feed of a web site like Google News. The format of a measure using WebParser.dll is similar to any measure, but always uses a couple of standard parameters: Other important parameters for WebParser (although not required) are: Substitute="TextYouDon'tWant":"TextYouDoWant" This is IDENTICAL to the "UpdateDivider=" used in other measures, to control how often the measure is run / updated. Due to apparently being "consistency-challenged", WebParser.dll decided to go its own way with the name for this parameter, so just be aware that on other measures you will use "UpdateDivider=" and for WebParser measures you will use "UpdateRate=". Having said that, I can't stress enough that this is an important parameter for WebParser. You DO NOT want to hit a web site once a second, as you will soon enough be seen as a DOS (Denial of Service) attack by the site and your IP address will be banned / blocked from accessing it. WebParser is one of the more powerful plugins for Rainmeter, but can be one of the most challenging to use. Example: [MeasureYahooWeather]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=600
URL=http://weather.yahooapis.com/forecastrss?p=22033&u=f
RegExp="(?siU)
[Meters]Meters are used to display information in Rainmeter. It may be static text or an image, or the value returned by a measure. Where "measures" are the guts of the "functionality" of Rainmeter, "meters" are the guts of the "output" of the program. Anything you want to display will need to be in a meter. There are a variety of types of meters, depending on what and how you want to display information:
The format of a meter is: Like measures, there are parameters for meters so you can control how the information is displayed. These include fonts, colors, sizes, positions and more. Parameter=Value These parameters will vary depending on the type of meter. More information on the parameters for different types of meters can be found at: Manual - Meters Example: [MeterWeather]
MeasureName=MeasureWeather
Meter=STRING
X=10
Y=10
FontColor=255,255,255,255
FontFace=Trebuchet MS
FontSize=12
StringEffect=NONE
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Using ActionsIn addition to the measures to gather information and meters to display things, there are several types of "Action" commands which can be put in either the Rainmeter section, measures or meters. The action statement is followed by the action you wish taken. Some of the action statements you can use are:
And a few which are specifically designed to work with the "Calc" measure type, but which can be used with any measure which returns a number value:
The actions you can take based on these action statements take two forms: !BangsThese are built-in commands in Rainmeter which can perform actions like hiding or showing meters, disabling or enabling measures, refreshing, loading or unloading skins and more. Full details and a list of these !Bangs can be found at: Manual - Bangs. The format for using a !Bang is: So for instance you might have a meter you want to click on and have it hide some other meter: LeftMouseDownAction=!RainmeterHideMeter MeterName !ExecuteThis is a special kind of !bang, which serves two purposes:Used to run two or more !bangs with the same action statement. |