R A I N M E T E R

Version 0.6

Info:
 
 
 
 
 
 
Rainmeter is a customizable resource meter that can display various performance data in different formats. Currently Rainmeter supports these measures:
  • CPU load
  • Allocated Memory
  • Network Traffic
  • NT performance data
  • Uptime
  • Free disk space

The data can be displayed in a histogram, a bar, bitmap frames or just plain numbers.

The application is a Litestep LoadModule plugin, but it can be used without the Litestep as well. You can use it even with the normal Explorer-shell if you like. Rainmeter also implements Litestep's wharf-interface so that it can be used with the lsbox-module. It might also work in a real wharf but this has not been tested as Rainmeter is not meant to be used in a wharf.

Rainmeter is developed and tested on Win2k, but it should work on Win9x also though Win9x is not officially supported.

And no, Rainmeter does not measure how much it rained last night (at least not yet ;-)

 
Install:
 
 
 
 
 
 
Installing for Litestep

To install just copy everything from the zip-file to a Rainmeter-subfolder in your Litestep-folder (i.e. wherever $litestepdir$ variable points to. Usually C:\Litestep\). You don't need the Rainmeter.exe if you are using Rainmeter as Litestep plugin, but there is no harm keeping that also in the folder. Also do not in under any circumstance replace your original lsapi.dll with the one that is in the Rainmeter's archive. The supplied lsapi.dll is only for the systems that doesn't have Litestep installed.

After copying, open your step.rc and add following line:

LoadModule $litestepdir$Rainmeter\Rainmeter.dll

... and recycle. The configuration of Rainmeter is done in a Rainmeter.ini file and not in the step.rc.

Installing for some other shell (e.g. Explorer)

Copy all the stuff in the zip-file to some location (e.g. C:\Program files\Rainmeter\). You also need the lsapi.dll somewhere in the path or in the same folder as Rainmeter.dll. You can give the Rainmeter.exe the ini-file as command line argument. The argument is used the same way as RainmeterIniFile step.rc command.

 
Config:
 
 
 
 
 
 
Configuration of the meters are done in a Rainmeter.ini-file. The Litestep's step.rc only has one optional entry, which can be used to define the configuration.

The ini-file is divided into three parts. All the general settings are put under [Rainmeter] section. After the general stuff comes the measures, which do the actual measuring. After the measures comes meters, which are visual representations of the measures. There can be many meters for one measure.

Here is some info what goes where:

Step.rc

RainmeterIniFile
This can be set to point to the Rainmeter.ini file if it is not placed in the default place (i.e. in a subfolder under the Rainmeter.dll's folder). You can also give just a path as the parameter. In this case the subfolders under the given path are checked for Rainmeter.ini-file and if such is found the subfolder is considered to be a config for Rainmeter. All the fond configs are listed in the Rainmeter's context menu, from where they can be changed on the fly.

The default behaviour (i.e. if RainmeterIniFile is not given) of Rainmeter is that is scans all the subfolders under the Rainmeter.dll's folder and checks for the configs. Note that this is different than in earlier versions where Rainmeter defaulted to the Rainmeter.ini in the Rainmeter.dll's folder.

General settings for Rainmeter

These must be put under [Rainmeter] section.

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.

WindowX
X-position of the meter window. Negative values can be used too, in which case the position is relative to right edge of the screen. If Rainmeter is ran inside a lsbox the window position should be set to 0.

WindowY
Y-position of the meter window. Negative values can be used too, in which case the position is relative to bottom edge of the screen.

SavePosition
If set to 1, the position of the window is stored in the Rainmeter.ini file so that it'll be remembered when Rainmeter is executed the next time.

AlwaysOnTop
If set to 1, the window is always on top of other windows. If 0, the window stays back of the other windows.

Draggable
If set to 1, the window can be dragged around with the mouse. If 0, the window stationary.

Update
The update time for the meters. The value should be given in milliseconds. The default value is 1000 (i.e. one second).

HideOnMouseOver
If set to 1 the meter window will disappear if the mouse pointer is moved on it. The window will reappear when the mouse pointer is moved off the position where the window was. If shift, ctrl or alt is hold while moving the mouse, the window will not disappear (or reappear).

StartHidden
If set to 1, Rainmeter is hidden when started. You can use !RainmeterShow-bang to make it visible.

GatherStatistics
If set to 1, Rainmeter will gather statistics from the measured values. Currently the stats are gathered only by the net meters, which hold information of the total amount of downloaded and uploaded data. The statistics are shown in the about dialog.

LeftMouseDownAction
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 the dragging.

RightMouseDownAction
Command or a bang that will be executed when the right mouse button is pressed down over the Rainmeter's window.

LeftMouseUpAction
Command or a bang that will be executed when the left mouse button is released over the Rainmeter's window.

RightMouseUpAction
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.

General settings for the measures

Each measure needs to have a unique name, which defines a section in the ini-file for that measure. The name needs to be put inside []-characters. The meters use the section names to bind to the measures. Check the supplied ini-file for example.

Measure
This defines what is measured. The valid values are:

  • CPU - Measures CPU load. Gives quite random results on Win9x.
  • Memory - Measures overall memory utilization.
  • PhysicalMemory - Measures allocated physical memory.
  • SwapMemory - Measures allocated swap.
  • NetIn - Measures incoming network traffic.
  • NetOut - Measures outgoing network traffic.
  • FreeDiskSpace - Measures free diskspace.
  • PerfMon - Gets NT's performance data. Only works on NT (naturally).
  • Uptime - Shows how long your computer has been on. This works only in a STRING-meter.
  • Plugin - Measure is defined by an external plugin.
  • Registry - Measures registry values.

InvertMeasure
If set to 1,
the measured value is inverted. E.g. you can measure allocated disk space instead of free space.

IfAboveAction
A bang or command that is executed when the measure goes above the value defined in IfAboveValue. The action is executed only when the measure exceeds the value, so the it needs to go below the defined value before the action is executed again.

IfAboveValue
The value for
IfAboveAction.

IfBelowAction
A bang or command that is executed when the measure goes below the value defined in IfBelowValue. The action is executed only when the measure falls below the value, so the it needs to go above the defined value before the action is executed again.

IfBelowValue
The value for
IfBelowAction.

Measure specific settings

Some of the measures can have special settings.

NetIn

NetInSpeed
The maximum speed of your network connection input. The value is given in bits per second. If this value is omitted or set to zero, the maximum value is determined from the input. Watch out for peaks.

NetOut

NetOutSpeed
The maximum speed of your network connection output. The value is given in bits per second. If this value is omitted or set to zero, the maximum value is determined from the input.

FreeDiskSpace

Drive
This is the drive which diskspace is measured. E.g. "C:\"

Plugin

Plugin
This defines the name of the plugin that handles the actual measuring.

Registry

RegKey
The name of the registry key.

RegValue
The name of the registry keys value. Only string and long values are supported.

MaxRegValue
The maximum value the measured registry value can have. Set this to 0 if unknown.

General settings for the meters

After the measures are defined comes the meter sections. Each meter needs to have an unique name, which is defined like with the measures.

MeasureName
The name of the measure that this meter displays.

X
The X-position of the meter inside the window.

Y
The Y-position of the meter inside the window.

W
The width of the meter. It is not necessary to define this if the width can be calculated from an image or if you are using a STRING meter. If you use the desktop as background for the Rainmeter you should always define the correct height and width for the meters or the window's dimensions might be calculated wrongly.

H
The height of the meter. This can also be left undefined under same conditions as W.

Meter
Type of the meter. The valid values are:

  • HISTOGRAM
  • STRING
  • BAR
  • BITMAP

Meter specific settings

The meters can have special settings.

Histogram

SecondaryMeasureName
The name of the secondary measure. This defines the measure for the secondary histogram that is drawn on the same meter. It is not necessary to define this if the other meter is not needed.

PrimaryColor
Color for the primary histogram. The colors are given in RGB format. Separate the color components with ",". E.g. 10,30,255

SecondaryColor
Color for the secondary histogram.

BothColor
Color that is used when the primary and secondary histograms are on top of eachother.

PrimaryImage
Name of the image that is used behind the secondary histogram. You can only use either colors or images but not both at the same time. So, if you define PrimaryImage you must also define SecondaryImage and BothImage (if you have a secondary measure in the same histogram).

SecondaryImage
Name of the image that is used behind the secondary histogram.

BothImage
Name of the image that is used when the primary and secondary histograms are on top of eachother.

String

FontColor
The color of the text.

Prefix
String that is displayed before the value.

Postfix
String that is displayed after the value.

FontFace
Name of the font

FontSize
Size of the font.

StringAlign
The alignment of the string. The valid values are: LEFT, CENTER and RIGHT.

StringStyle
Style of the string. The valid values are: NORMAL, BOLD, ITALIC and BOLDITALIC.

Scale
Scaling factor for the measured value. The measured value is divided with the scale value, so in order to get 1000 times smaller values just set the scale to 1000. If the scale value has a decimal point (e.g. 1000.0) the resulting measured value is displayed as floating point value with one decimal.

AutoScale
If set to 1, the value is scaled automatically. This setting overrides Scale. The value is automatically postfixed with T, G, M or k depending how much it was scaled.

Percentual
If set to 1, the value is displayed in percents.

Bar

BarColor
The color of the bar.

BarImage
The image that is used behind the bar. This can be used instead of the BarColor.

BarOrientation
The orientation of the bar. Valid values are:

  • HORIZONTAL
  • VERTICAL

Bitmap

BitmapImage
This is the name of the image that holds the image frames. The images can be laid horizontally or vertically in the bitmap. The orientation is determined automatically form the hieght or the width of the bitmap (whichever is larger). Also the size of one frame is calculated automatically so you need to crop the image so that there is no extra space around the frames.

BitmapFrames
The number of  frames in the bitmap.

 
Plugins:
 
 
 
 
 
 

A Rainmeter plugin is a DLL that exports these functions:

UINT Initialize(HMODULE instance, LPCTSTR iniFile, LPCTSTR section, UINT id);
void Finalize(HMODULE instance, UINT id);
UINT Update(UINT id);

The Initialize function is called when the measure is initialized. The function returns the maximum value that can be measured. If the maximum value is unknown the function should return 0. The plugin can also have it's own settings which can be loaded from the iniFile and the section given as parameters to the initialize function. the id-parameter is used to identify individual measures if there are several of them using the same plugin.

Finalize is called when the measure is deleted. The Update is called once per update period (usually once per second). The function returns the measured value. Check the Rainmeter sources for example how to implement a plugin.

Currently there is one plugin distributed with the Rainmeter package. It is called PerfMon.dll and it can be used to measure NT's performance data. The plugin is the same as the PerfMon-measure that was build-in with the previous releases of Rainmeter. The settings for the plugins should be placed in the Plugin-measure's section in the ini-file.

PerfMon (Win2k and WinXP only!)
(use NT's performance monitor to find out the valid values for these settings)

PerfMonObject
The name of the performance object. E.g. Memory, Process, Processor, ...

PerfMonCounter
The name of the performance counter. E.g. "% Processor Time", "Disk Read Bytes/sec", ...

PerfMonInstance
The name of the instance. E.g. _Total. If the counter doesn't have any instances you can leave this empty.

PerfMonMaxValue
The maximum value for the measured counter. This needs to be set if you are displaying the measure in a histogram or use the InvertMeasure setting. If this value is omitted or set to zero, the maximum value is determined from the input.

PerfMonDifference
If set to 1, the difference between two updates is measured instead of the actual value. This is useful as many of the performance values are counters and you usually want to know how much the counter has increased since last update.

 

 
Bangs:
 
 
 
 
 
 
The Rainmeter can be controlled also with Litestep !Bang-commands.

!RainmeterShow
Displays the Rainmeter-window.

!RainmeterHide
Hides the Rainmeter-window.

!RainmeterRefresh
Reloads the Rainmeter.ini file.

 
Legal:
 
 
 
 
 
 
This program is free software. Like Litestep, it is released under GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Please note that this software is still in beta-state and is most likely to have defects and may not work as it should. Use it at your own risk. The author is not responsible for any damage, direct or indirect, that this software may cause.

 

 
Contact:
 
 
 
 
 
 
The latest version will be found from my homepage at:

http://www.iki.fi/~rainy/

You may also send comments and bug-reports to author:

rainy@iki.fi

Please put the name of the product (i.e. Rainmeter) in the subject-field of the mail. It may be useful if you write the version of the product also. If you are reporting a bug, please try to be as exact as possible when describing the symptoms. Also some details of your system (like OS version, Litestep build, and so on) might be helpful.

 

 
Future:
 
 
 
 
 
 
Here is some features which may be included in the future:
  • More things to measure (any suggestions?)
  • Properly autoscaling histogram
  • GUI config (yeah right :-)
 
 
History:
 
 
 
 
 
 

15 JANUARY 2002 (Version 0.6 ß)

  • Fixed a bug that made the CPU-meter to go 100% after refreshing on Win9x.
  • It is not necessary to name the config file as "Rainmeter.ini", anything that ends with ".ini" will do. Note that this only applies if the name of the config file is defined explicitely.
  • If the previously used config cannot be found anymore, the first one is used instead.

26 DECEMBER 2001 (Version 0.5 ß)

  • IMPORTANT! The configuration file format has been changed and the old ini-files do not work anymore! Also some of the config keywords have been changed.
  • Structural changes to the code (now it is easier to maintain).
  • Added GatherStatistics, which is currently only supported by the NetIn/Out-measures.
  • Added Plugin measure for external counters. Check the source code for example plugin.
  • Added Registry measure, which can get data from a given registry key.
  • Added button up actions (RightMouseUpAction and LeftMouseUpAction) and renamed the down actions as RightMouseDownAction and LeftMouseDownAction
  • Added support for actions that are executed when a measure goes above/below certain value.
  • Removed the PerfMon measure because of incompatibilities with NT4. The PerfMon measure is now implemented as Rainmeter plugin.
  • Added Time-measure.
  • Colors can now be defined also as hex values in RGB-format (e.g. FontColor=FFCCDD).
  • The position of the window can be stored into the ini-file automatically.
  • Added support for multiple configurations. The configs can be changed from context menu.

1 SEPTEMBER 2001 (Version 0.4 ß)

  • If the maximum value for the meters (e.g. NetInSpeed) is not given it is determined automatically from the input.
  • All measures can be displayed as percentual strings.
  • Added uptime-measure. Usable in a string-meter only!
  • Added two new meters: Bar and Bitmap.
  • Added !RainmeterRefresh bang.
  • Added left and right mouse button actions.
  • Now it is possible to define the location (and the name) of Rainmeter.ini-file in the step.rc with RainmeterIniFile.
  • Added context menu, which can be used to refresh the window and quit the program if ran as standalone.
  • Added possibility to use images as the backgrounds for the histogram graphs.
  • Small adjustments so that Rainmeter can run in a lsbox as *WharfModule. Dunno if it also works in a real wharf.

19 AUGUST 2001 (Version 0.3 ß)

  • Added support for NT performance data.
  • Added support for measuring free disk space.
  • Added possibility to display the measure values as plain strings.
  • Added automatic scaling for the string values.
  • Added possibility to invert the values (e.g. measure allocated disk space instead of free space).
  • Improved mouse over hiding.
  • Now it is possible to start Rainmeter hidden.
  • Added support for Litestep's Revision ID.

19 JULY 2001 (Version 0.2 ß)

  • Rewrote (almost) everything.
  • The CPU & memory are now measured a bit different way.

22 FEBRUARY 2001 (Version 0.1 ß)

  • Initial beta release