Measures
Measures are the sections that determine what information Rainmeter should
retrieve. Each measure needs to have a unique name, which is put inside [Square
Brackets]. It does not matter what the name is as long as there are no spaces
and you don't use that name anywhere else within the same .ini file. The meters
use these section names to bind to the measures. Check the supplied .ini for
examples.
Important: 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.
General settings for all measures
Measure
This defines what is measured. The valid values are:
- CPU - Measures total load from CPU or individual cores.
- Memory - Measures overall memory utilization.
- PhysicalMemory - Measures allocated physical memory.
- SwapMemory - Measures virtual memory allocation (Swap).
- Uptime - Shows how long your computer has been on. This works only in a STRING meter.
- NetIn - Measures incoming network traffic.
- NetOut - Measures outgoing network traffic.
- NetTotal - Measures total network traffic.
- FreeDiskSpace - Measures free diskspace.
- PerfMon - Gets NT's performance data.
- Plugin - Measure is defined by an external plugin.
- Registry - Measures registry values.
- Time - Measures time and date.
- Calc - Calculates formulas.
InvertMeasure
If set to 1, the measured value is inverted. For example, you can measure the
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 at the moment when the
measure exceeds the value, so it needs to go below the defined value before
the action is executed again.
IfAboveValue
The value used by IfAboveAction.
IfBelowAction
A bang or command that is executed when the measure goes below the value
defined in IfBelowValue. The action is executed only at the moment when the
measure falls below the value, so it needs to go above the defined value before
the action is executed again.
IfBelowValue
The value used by IfBelowAction.
IfEqualAction
A bang or command that is executed when the measure is equal with the value
defined in IfEqualValue. The action is executed only once when the measure is
equal to the value, so it needs to go above or below the defined value before
the action is executed again. The value is rounded to full integer.
IfEqualValue
The value used by IfEqualAction.
Disabled
If set to 1, the measure is disabled at start. A disabled measure always
returns zero as its value.
UpdateDivider
This value modifies the update rate of the measure. The global Update value (set
in the [Rainmeter] section) is multiplied by this number to determine the update
rate for the measure. For example, if the Update is set to 1000 and the
UpdateDivider is 30, the measure is updated every 30 seconds. The default value
is 1.
MaxValue
The maximum value the measure can have. The default is 1.0.
MinValue
The minimum value the measure can have. The default is 0.0.
Substitute
A list of comma separated value pairs that can be used to change certain
values to another. You must use quotes around the values! eg:
Substitute="cat":"dog" would change all "cat" to "dogs" in the measured value.
AverageSize
Defines the window size of average measuring. eg: if this is set to 10 the
returned value is the average of last ten values.
The following are settings that are specific to certain measure types:
CPU
Processor
Can be set to the number (1-n) of the processor core you wish to measure. If not given or set to "0", the
average of all cores will be returned.
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.
TrafficAction
Action to be executed when a certain amount of data has been downloaded.
TrafficValue
The value used by TrafficAction.
Interface
The index of the measured NIC. If this is set to 0 (default) all interfaces are
added together. Value 1 means the first NIC, 2 the second, etc.
Cumulative
If set to 1, the measure gathers cumulative value (i.e. adds the measured
values together). This can be used to measure the total amount of transferred
data during certain period of time.
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.
TrafficAction
Action to be executed when a certain amount of data has been uploaded.
TrafficValue
The value for the TrafficAction.
Interface
The index of the measured NIC. If this is set to 0 (default) all interfaces are
added together. Value 1 means the first NIC, 2 the second, etc.
Cumulative
If set to 1, the measure gathers cumulative value (i.e. adds the measured
values together). This can be used to measure the total amount of transferred
data during certain timeperiod.
NetTotal
NetTotalSpeed
The maximum speed of your total network connection. 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.
TrafficAction
Action to be executed when a certain amount of data has been uploaded and
downloaded.
TrafficValue
The value for the TrafficAction.
Interface
The index of the measured NIC. If this is set to 0 (default) all interfaces are
added together. Value 1 means the first NIC, 2 the second, etc.
Cumulative
If set to 1, the measure gathers cumulative value (ie: adds the measured
values together). This can be used to measure the total amount of transferred
data during certain timeperiod.
FreeDiskSpace
Drive
This is the drive which disk space is measured. (eg: "C:\")
Total
If set to 1 this returns the total size of the drive.
Label
If set to 1 this returns the label of the drive.
InvertMeasure
If set to 1 this returns "used space" instead of "free space". This setting is not limited to FreeDriveSpace.
IgnoreRemovable
Default is 1 - Removable drives are ignored. If set to 0, removable drives are measured.
Plugin
Plugin
The path to the plugin relative to the program folder, where Rainmeter.exe is
(eg: Plugin=Plugins\WebParser.dll).
Note: Each plugin in turn has its own settings that must be placed in
this section. See their respective help pages to learn more on the plugins
included with Rainmeter.
Registry
RegHKey
The name of the HKEY. Possible values are:
- HKEY_CURRENT_CONFIG
- HKEY_CURRENT_USER
- HKEY_LOCAL_MACHINE
- HKEY_CLASSES_ROOT
- HKEY_PERFORMANCE_DATA
- HKEY_DYN_DATA
RegKey
The name of the registry key.
RegValue
The name of the registry key's value. Only string and long values are supported.
Time
Format
The format how the time is written (eg: Format="%H:%M:%S"). The format codes are
listed here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp
You can also use "locale-time" and "locale-date" to use the format that is used
currently in Windows.
TimeZone
The timezone value (eg: TimeZone=+2.0). You can use also fractional values. If
this is not given the local time is used.
DaylightSavingTime
If set to 1, the daylight saving time is applied to the time (it depends on your
local time). This is only used if the TimeZone has been set.
Calc
Formula
This defines the formula to be calculated. You can use the names of other
measures as variables. There is also a special variable called Counter, which is
incremented on every update. The variables are updated only after all other
measures are updated, so the values are always one update cycle behind.
Note: Everything is case sensitive and the functions must be in all
capital letters (eg: SIN(10 * PI)).
Operators:
-
+ (addition)
-
- (substraction)
-
* (multiplication)
-
/ (division)
-
** (power)
-
% (remainder or modulus)
-
& (bitwise and)
-
| (bitwise or)
-
^ (bitwise xor)
-
~ (bitwise not)
Logical operators:
-
<> (not equal)
-
= (equal to)
-
> (greater than)
-
< (less than)
-
&& (logical and)
-
|| (logical or)
Functions:
- ATAN(x), ASIN(x), ACOS(x), COS(x),
SIN(x), TAN(x) - Standard trigonometric functions
- ABS(x) - Absolute value of x.
- EXP(x) - Returns ex.
- LOG(x) - Base 10 logarithm of x.
- LN(x) - Natural logarithm of x.
- SQRT(x) - Square root of x.
- SGN(x) - Return 1 if x is positive, -1 if x is negative.
- FRAC(x) - Fractional, or decimal, part (eg: FRAC(1.234) = 0.234).
- TRUNC(x) - Integer par (eg:TRUNC(1.234) = 1).
- FLOOR(x) - Floor of x.
- CEIL(x) - Ceiling of x.
- ROUND(x[,precision]) - Rounds x to an integer, or
to a specified number of decimal places. Precision is optional.
Constants:
- PI - Pi (~3.14159265...)
- E - Euler's constant (~2.71828182...)
Conditional operator:
<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:
if (
condition)
then
expr. if true
else
expr. if false
end if
Random Function:
The word "Random" returns a random number between the values of "LowBound"
and "HighBound" defined in the measure.
Example:
[MeasureCalc]
Measure=Calc
Formula=(Random)
LowBound=5
HighBound=100
UpdateRandom=1
UpdateRandom=1 (New random number each Update cycle)
UpdateRandom=0 (New random number on refresh)
Other bases:
The Calc measure allows numbers to be represented numbering systems other than decimal. To use another base, use the appropriate prefix before the number. Accepted prefixes are:
- 0 (zero) - Octal number (base 8) (ex: 0123 - returns 83 in decimal)
- 0x - Hexadecimal number (base 16) (ex: 0xF1 - returns 241 in decimal)
Note: Please avoid using the prefix for octal numbers until the 1.3 beta is released. The prefix will be changed in version 1.3 in order to avoid conflicts with measures, such as the Time measure and the WebParser plugin, that return numbers with leading zeroes.