### Rainmeter Silent Install Examples
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Demonstrates various ways to execute the Rainmeter installer silently with different parameter combinations for installation and configuration.
```bash
Rainmeter-4.5.0.exe /S /AUTOSTARTUP=0 /VERSION=32
Rainmeter-4.5.0.exe /S /RESTART=0
Rainmeter-4.5.0.exe /S /PORTABLE=1 /D=E:\MyRainmeter
```
--------------------------------
### C# Plugin Development Example
Source: https://docs.rainmeter.net/developers
This snippet illustrates the development of a C# Rainmeter plugin using Visual Studio. It covers project setup, GUID generation, and the build process for creating distributable DLLs.
```C#
using System;
using Rainmeter;
public class PluginEmpty : IPlugin
{
public int Initialize(IntPtr data) {
// Plugin initialization code
return 0;
}
public void Shutdown(IntPtr data) {
// Plugin shutdown code
}
// Add other plugin methods as needed
}
```
```Visual Studio Project
Release
AnyCPU
{YOUR_NEW_GUID}
DynamicLibrary
Properties
PluginEmpty
PluginEmpty
v4.0
512
true
```
--------------------------------
### Matrix Multiplication Examples
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
Illustrates valid and invalid matrix multiplications based on dimension compatibility. This helps understand the prerequisites for transforming points using matrices.
```text
|1 2 3| |5 1| This multiplication will work
|4 5 6| x |6 2|
|7 8 9| |9 4|
|4 7 1.1| |4| This multiplication will work
|0 2 0.5| x |7|
|1|
|5 3| |7 4| This multiplication is downright impossible
|7 8| x |3 1|
|0 2|
```
--------------------------------
### Matrix Examples in Rainmeter
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
Illustrates different types of matrices used in Rainmeter, including their dimensions and structure. These examples help in visualizing how numbers are organized in a matrix format for transformations.
```plaintext
|1 2 3| This is a 2x3 matrix
|4 5 6|
|1| This is a 3x1 matrix. Normally, we call a matrix with
|2| only one column a VECTOR.
|3|
|15 20.2 4| A 3x3 matrix
| 6 0.1 1|
| 4 5 12|
```
--------------------------------
### Rainmeter Skin Example: Image and Square
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
A basic Rainmeter skin demonstrating an IMAGE meter for a background and another IMAGE meter for a square. The square uses a TransformationMatrix to define its initial state.
```Rainmeter
[MeterBG]
Meter=IMAGE
w=200
h=200
SolidColor=255,255,255,128
[MeterSquare]
Meter=IMAGE
w=50
h=50
x=75
y=75
SolidColor=0,0,0
TransformationMatrix=1;0;0;1;0;0
```
--------------------------------
### Rainmeter Button Meter Configuration
Source: https://docs.rainmeter.net/tips/button-images
Example of a Rainmeter Button meter configuration, specifying the meter type, position, and the button image file to use. It also shows how to define the command executed when the button is clicked.
```Rainmeter
[MeterSample]
Meter=Button
X=1
Y=1
ButtonImage=MyButton.png
ButtonCommand=["SomeCommand"]
```
--------------------------------
### Rainmeter Line Meter Example
Source: https://docs.rainmeter.net/manual/meters/line
This example demonstrates how to use the Line meter in Rainmeter to visualize network traffic (NetOut and NetIn). It includes basic setup, measure definitions, and the Line meter configuration with multiple lines and colors.
```Rainmeter
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Metadata]
Name=ExampleMeterLine
Author=The Rainmeter Team
Information=Example of the Line meter
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.0
[MeterBackground]
Meter=Image
W=220
H=80
SolidColor=150,150,150,255
[MeasureNetIn]
Measure=NetIn
[MeasureNetOut]
Measure=NetOut
[MeterNetworkLine]
Meter=Line
MeasureName=MeasureNetOut
MeasureName2=MeasureNetIn
X=5
Y=5
W=210
H=70
LineCount=2
LineColor=140,252,124,255
LineColor2=254,211,122,255
SolidColor=0,0,0,255
AutoScale=1
AntiAlias=1
```
--------------------------------
### WinGet Rainmeter Installation
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Shows how to install Rainmeter using the WinGet command-line tool. This command installs the latest version or upgrades an existing one.
```bash
winget install Rainmeter
winget upgrade Rainmeter
```
--------------------------------
### WinGet Rainmeter Installation with Override
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Illustrates how to use the `--override` parameter with WinGet to pass custom silent installation parameters to the Rainmeter installer.
```bash
winget install Rainmeter --override "/S /PORTABLE=1 /D=E:\MyRainmeter"
```
--------------------------------
### Rainmeter Safe Start
Source: https://docs.rainmeter.net/manual/user-interface
Explains how to use the Safe Start feature in Rainmeter to unload all active skins and load the default Illustro Layout if a skin is causing the application to crash or prevent startup. This feature helps recover from problematic skin installations without data loss.
```Rainmeter
Hold down the `CTRL` key while running the shortcut or .exe for Rainmeter, and it will offer to **Safe Start** Rainmeter.
What this will do is unload all active skins, and load the default Illustro Layout that comes with Rainmeter.
This does not remove or in any way harm the skins you have, but simply loads the default Illustro Layout. Your current setup will be saved as a Layout in @Backup.
```
--------------------------------
### Standard Installation - Settings Folder Path
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Details the default directory for Rainmeter's configuration files, including settings and layouts, during a standard installation.
```plaintext
C:\Users\YourName\Appdata\Roaming\Rainmeter
```
--------------------------------
### Initialize Function Example (C++)
Source: https://docs.rainmeter.net/developers/plugin/cpp
Example of the Initialize function, which is called when a Rainmeter measure is created. It demonstrates allocating memory for measure-specific data and storing it.
```C++
PLUGIN_EXPORT void Initialize(void** data, void* rm)
Measure* measure = new Measure;
*data = measure;
// Do any initialization here, saving any values you want to into data for later
}
```
--------------------------------
### Rainmeter TransformationMatrix Examples
Source: https://docs.rainmeter.net/manual/meters/general-options
Demonstrates how to use the TransformationMatrix setting in Rainmeter to perform transformations like flipping and scaling on meters. The examples show specific matrix values and their resulting effects.
```ini
TransformationMatrix=-1; 0; 0; 1; 40; 0
```
```ini
TransformationMatrix=1; 0; 0; -1; 0; 100
```
```ini
TransformationMatrix=0.5; 0; 0; 1; 25; 0
```
--------------------------------
### Install Rainmeter Skin (.rmskin)
Source: https://docs.rainmeter.net/manual/installing-skins
Automatically installs Rainmeter skins using the .rmskin format. This method involves double-clicking the .rmskin file, which launches the Rainmeter Skin Installer. The installer allows users to review and install skins, layouts, and plugins, with options for system font installation and skin backups.
```text
Double-click the .rmskin file, click Install.
```
--------------------------------
### Rainmeter Transformation Matrix Example
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
This snippet shows how to apply a transformation matrix in Rainmeter. It defines the matrix parameters (a, b, c, d, tx, ty) to achieve effects like rotation and scaling. Ensure the format 'TransformationMatrix=a;b;c;d;tx;ty' is followed.
```Rainmeter
TransformationMatrix=1.9318;-0.5176;0.5176; 1.9318;-157.0034;-18.1255
```
--------------------------------
### Standard Installation - Program Files Path
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Specifies the default directory where Rainmeter is installed on Windows during a standard installation.
```plaintext
C:\Program Files\Rainmeter
```
--------------------------------
### Manually Install Rainmeter Skins
Source: https://docs.rainmeter.net/manual/installing-skins
This snippet shows the directory path where Rainmeter skins should be placed for manual installation. Ensure you replace 'YourName' with your actual username.
```text
C:\Users\YourName\Documents\Rainmeter\Skins
```
--------------------------------
### Rainmeter Alias Examples
Source: https://docs.rainmeter.net/manual/plugins/usagemonitor
Examples of using the 'Alias' option in Rainmeter to create shortcuts for common performance counter combinations.
```Rainmeter Configuration
Alias=CPU
Category: _Process_ | Counter: _% Processor Time_
```
```Rainmeter Configuration
Alias=RAM
Category: _Process_ | Counter: _Working Set - Private_
```
```Rainmeter Configuration
Alias=RAMSHARED
Category: _Process_ | Counter: _Working Set_
```
```Rainmeter Configuration
Alias=IO
Category: _Process_ | Counter: _IO Data Bytes/sec_
```
```Rainmeter Configuration
Alias=IOREAD
Category: _Process_ | Counter: _IO Read Bytes/sec_
```
```Rainmeter Configuration
Alias=IOWRITE
Category: _Process_ | Counter: _IO Write Bytes/sec_
```
```Rainmeter Configuration
Alias=GPU
Category: _GPU Engine_ | Counter: _Utilization Percentage_
```
```Rainmeter Configuration
Alias=VRAM
Category: _GPU Process Memory_ | Counter: _Dedicated Usage_
```
```Rainmeter Configuration
Alias=VRAMSHARED
Category: _GPU Process Memory_ | Counter: _Shared Usage_
```
--------------------------------
### Installing Custom Rainmeter Plugins
Source: https://docs.rainmeter.net/manual/plugins
Custom plugins (.dll files) can be installed manually by placing them in the 'Plugins' folder within the Rainmeter installation's settings path. Ensure the plugin's architecture (32-bit or 64-bit) matches Rainmeter's.
```File System
Copy 'MyCustomPlugin.dll' to '[Rainmeter Settings Path]\Plugins\'
```
--------------------------------
### Rainmeter Skin Example with ActionTimer
Source: https://docs.rainmeter.net/manual/plugins/actiontimer
A complete Rainmeter skin example demonstrating the use of the ActionTimer plugin to dynamically change the size of text and update its content based on mouse interactions. It utilizes ActionLists for resizing logic.
```rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
W=15
U=[!UpdateMeasureGroup Sizers][!UpdateMeter MeterText][!Redraw]
Size=8
[MeasureSizeUp]
Measure=Plugin
Plugin=ActionTimer
Group=Sizers
ActionList1=ChangeSizeStart|Wait #W#|Repeat ChangeSizeCalc,#W#,11
ChangeSizeStart=[!SetVariable Size "#Size#"]#U#
ChangeSizeCalc=[!SetVariable Size "(Clamp(#Size#+5,8,60))"]#U#
IfCondition=#Size# = 8
IfTrueAction=[!SetOption MeterText Text "small"]#U#
IfCondition2=(#Size# > 8) && (#Size# < 60)
IfTrueAction2=[!SetOption MeterText Text "Changing"]#U#
IfCondition3=#Size# = 60
IfTrueAction3=[!SetOption MeterText Text "BIG"]#U#
DynamicVariables=1
[MeasureSizeDown]
Measure=Plugin
Plugin=ActionTimer
Group=Sizers
ActionList1=ChangeSizeStart|Wait #W#|Repeat ChangeSizeCalc,#W#,11
ChangeSizeStart=[!SetVariable Size "#Size#"]#U#
ChangeSizeCalc=[!SetVariable Size "(Clamp(#Size#-5,8,60))"]#U#
IfCondition=#Size# = 8
IfTrueAction=[!SetOption MeterText Text "small"]#U#
IfCondition2=(#Size# > 8) && (#Size# < 60)
IfTrueAction2=[!SetOption MeterText Text "Changing"]#U#
IfCondition3=#Size# = 60
IfTrueAction3=[!SetOption MeterText Text "BIG"]#U#
DynamicVariables=1
[MeterText]
Meter=String
W=400
H=90
X=200
Y=45
StringAlign=CenterCenter
FontSize=#Size#
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
Text=Small
UpdateDivider=-1
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSizeDown "Stop 1"][!CommandMeasure MeasureSizeUp "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSizeUp "Stop 1"][!CommandMeasure MeasureSizeDown "Execute 1"]
```
--------------------------------
### Standard Installation - Skins Folder Path
Source: https://docs.rainmeter.net/manual/installing-rainmeter
Indicates the default location for Rainmeter skins, which are user-created customizations, during a standard installation.
```plaintext
C:\Users\YourName\Documents\Rainmeter\Skins
```
--------------------------------
### Rainmeter @Vault Resource Storage Examples
Source: https://docs.rainmeter.net/manual/distributing-skins/vault-folder
Provides examples of how to organize custom resources like fonts, sound files, and Lua scripts within the @Vault folder for easy access and reuse in Rainmeter skins.
```text
..Documents\Rainmeter\Skins\@Vault\MyFonts\FiraSans.ttf
..Documents\Rainmeter\Skins\@Vault\MySounds\Alarm.wav
..Documents\Rainmeter\Skins\@Vault\MyLuaScripts\ConvertFtoC.lua
```
--------------------------------
### Remove Rainmeter Startup Shortcut
Source: https://docs.rainmeter.net/tips/clean-rainmeter-uninstall
To prevent Rainmeter from automatically starting, remove its shortcut from the Windows Startup folder. This applies to both user-specific and all-users installations.
```Windows Batch
REM Delete Rainmeter startup shortcut (for current user)
del "C:\Users\_YourName_\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Rainmeter.lnk"
REM Delete Rainmeter startup shortcut (for all users)
del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\Rainmeter.lnk"
```
--------------------------------
### Rainmeter WebParser Initial Setup
Source: https://docs.rainmeter.net/tips/webparser-tutorial
Initial configuration for a Rainmeter WebParser measure to fetch raw HTML from a URL. Includes settings for update frequency, accuracy, and debugging to output HTML to a file for analysis.
```Rainmeter
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[MeasureSite]
Measure=WebParser
URL=https://browserleaks.com/ip
RegExp=
Debug=2
[MeterDummy]
Meter=String
```
--------------------------------
### Load Skin Example
Source: https://docs.rainmeter.net/manual/getting-started/using-rainmeter
Demonstrates how to load a specific skin ('Google.ini') from the Rainmeter library using the context menu. This action places the skin on the desktop at a default or previously saved location.
```Rainmeter Configuration
illustro -> Google -> Google.ini
```
--------------------------------
### Rainmeter VU Meter Style Circle
Source: https://docs.rainmeter.net/tips/radians-guide
This example demonstrates configuring a Rainmeter Roundline meter for a VU meter style, where the circle starts from the left and completes at the right. It sets StartAngle to 180 degrees and RotationAngle to 180 degrees.
```ini
StartAngle=(Rad(180))
RotationAngle=(Rad(180))
```
--------------------------------
### Rainmeter Configuration Language Example
Source: https://docs.rainmeter.net/manual/getting-started
This snippet demonstrates a basic example of Rainmeter's configuration language, used for creating and modifying skins. It highlights how variables are typically labeled and commented for ease of use by novice programmers.
```Rainmeter
[Rainmeter]
Update=1000
[MeterStyle]
Meter=String
Text="Hello, Rainmeter!"
FontSize=20
FontColor=255,255,255
SolidColor=0,0,0
Padding=10,10,10,10
[Variables]
MyVariable="This is a custom variable"
```
--------------------------------
### Create Rainmeter Launcher Skin
Source: https://docs.rainmeter.net/manual/getting-started/basic-tutorials/launcher
This snippet demonstrates the initial steps to create a new Rainmeter skin file named 'Launcher.ini' within a 'Tutorials/Launcher' folder structure. It outlines the process of creating the folder and the .ini file using Windows Explorer and then refreshing Rainmeter to recognize the new skin.
```ini
; Rainmeter skin file
; Create this file in your Rainmeter skins directory under Tutorials/Launcher/Launcher.ini
```
--------------------------------
### Get Network Adapter GUID
Source: https://docs.rainmeter.net/manual/measures/sysinfo
Retrieves the GUID of a specified network adapter as a string. Requires specifying the adapter via SysInfoData.
```Rainmeter
[MeasureAdapterGUID]
Measure=NetInfo
NetInfoType=ADAPTER_GUID
SysInfoData=0
```
--------------------------------
### Creating a Full Rainmeter Build with NSIS
Source: https://docs.rainmeter.net/developers
Guidance on how to create a complete Rainmeter installer. This requires NSIS version 3.04 or later and running the Build.bat script. It also includes instructions for building a release version and digitally signing the installer and executables.
```Batch
REM Navigate to the Build folder
cd Build
REM Build a standard release installer
Build.bat RELEASE
REM To digitally sign the installer and executables, create a Certificate.bat file:
REM set CERTFILE=/path/to/PFXcert.p12
REM set CERTKEY=certpassword
REM Then run Build.bat again (it will use Certificate.bat if present)
```
--------------------------------
### Rainmeter Power Plugin Example
Source: https://docs.rainmeter.net/manual/plugins/power
This example demonstrates how to use the Power plugin to display the battery percentage in Rainmeter. It sets up a measure to get the battery percentage and a meter to display it as text.
```Rainmeter
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255
[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
[MeterBatteryPercent]
Meter=String
MeasureName=MeasureBatteryPercent
X=5
Y=5
W=200
H=20
FontColor=255,255,255,255
Text=Battery left: %1
```
--------------------------------
### Rainmeter SysInfo Plugin Example
Source: https://docs.rainmeter.net/manual/measures/plugin
This example demonstrates how to use the SysInfo plugin within Rainmeter to retrieve and display the current user's name. It sets up a basic Rainmeter configuration, defines a plugin measure to get the user name, and then uses a String meter to display it.
```Rainmeter
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255
[MeasureUserName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=USER_NAME
[MeterText]
Meter=String
MeasureName=MeasureUserName
X=5
Y=5
W=100
H=25
FontColor=255,255,255,255
Text="User: %1"
```
--------------------------------
### Transforming a Point with a Matrix
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
Shows the setup for multiplying a 3x3 transformation matrix by a 3x1 coordinate vector to find the transformed point.
```text
|a c tx| |x|
|b d ty| x |y|
|0 0 1| |1|
```
--------------------------------
### Rainmeter Basic Loop Example
Source: https://docs.rainmeter.net/manual/measures/loop
This example demonstrates a basic implementation of the Rainmeter Loop measure. It sets up two loop measures with different start and end values and displays their progress using String meters. The LeftMouseUpAction allows toggling the loop's pause state, and MiddleMouseUpAction resets the loop.
```rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureLoop1]
Measure=Loop
StartValue=37
EndValue=59
Increment=1
LoopCount=0
[MeasureLoop2]
Measure=Loop
StartValue=10
EndValue=0
Increment=-1
LoopCount=1
[MeterLoop1]
Meter=String
MeasureName=MeasureLoop1
W=154
H=50
X=77
StringAlign=Center
FontSize=35
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
LeftMouseUpAction=[!TogglePauseMeasure MeasureLoop1]
MiddleMouseUpAction=[!CommandMeasure MeasureLoop1 "Reset"]
[MeterLoop2]
Meter=String
MeasureName=MeasureLoop2
W=154
H=50
X=77
Y=10R
StringAlign=Center
FontSize=35
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
LeftMouseUpAction=[!TogglePauseMeasure MeasureLoop2]
MiddleMouseUpAction=[!CommandMeasure MeasureLoop2 "Reset"]
```
--------------------------------
### Rainmeter Skin Initialization
Source: https://docs.rainmeter.net/tips/rss-feed-tutorial
Initializes a Rainmeter skin with update frequency and dynamic window sizing.
```Rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
```
--------------------------------
### Get Monitor Count in Rainmeter
Source: https://docs.rainmeter.net/manual/measures/sysinfo
Retrieves the total number of active display monitors connected to the system. This value is essential for configurations that adapt to multi-monitor setups.
```Rainmeter
[MeasureNumMonitors]
Measure=SystemInfo
SysInfoType=NUM_MONITORS
```
--------------------------------
### Rainmeter ActionTimer: Basic ActionList Example
Source: https://docs.rainmeter.net/manual/plugins/actiontimer
Demonstrates a basic ActionList in Rainmeter's ActionTimer plugin, executing a sequence of predefined actions with a specified wait time between them.
```Rainmeter
[MeasureChangeFont]
Measure=Plugin
Plugin=ActionTimer
ActionList1=SetFontSmall | Wait 1000 | SetFontBig
SetFontSmall=[!SetOption SomeMeter FontSize "10"][!UpdateMeter SomeMeter][!Redraw]
SetFontBig=[!SetOption SomeMeter FontSize "15"][!UpdateMeter SomeMeter][!Redraw]
```
--------------------------------
### Get Top Process CPU Usage by Index with UsageMonitor
Source: https://docs.rainmeter.net/manual/plugins/usagemonitor
This example demonstrates how to retrieve the CPU usage of the top process using the UsageMonitor plugin by specifying Index 1.
```ini
[MeasureTop]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Index=1
```
--------------------------------
### Rainmeter Configuration Example with PowerShell
Source: https://docs.rainmeter.net/manual/plugins/runcommand
A complete Rainmeter configuration demonstrating how to use the RunCommand plugin to execute a PowerShell command, capture its output, and display it. It includes measure definitions for running the command and a meter to display the result.
```Rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=PowerShell
Parameter=(Get-CimInstance -ClassName Win32_Processor -Property Name).Name
State=Hide
OutputType=ANSI
OutputFile=#CURRENTPATH#CPUName.txt
RegExpSubstitute=1
Substitute="\s+#CRLF#":""
[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Run
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]
[MeterResult]
Meter=String
MeasureName=MeasureRun
Y=10R
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
```
--------------------------------
### Initialize Script in Lua
Source: https://docs.rainmeter.net/manual/lua-scripting
The Initialize function is called once when a Rainmeter skin is activated or refreshed. It's used for script setup, such as declaring global variables. This example shows a basic initialization.
```Lua
function Initialize()
MyVariable = 'Hello, world!'
end
```
--------------------------------
### Rainmeter Image Meter Configuration Example
Source: https://docs.rainmeter.net/manual/meters/image
This example demonstrates the configuration of an Image meter in Rainmeter, showcasing various options for displaying and manipulating images, including scaling, tinting, and using a measure to dynamically load pictures.
```Rainmeter
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Metadata]
Name=ExampleMeterImage
Author=The Rainmeter Team
Information=Example of the Image meter
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.0
[MeterBackground]
Meter=Image
ImageName=#@#Images\Background.jpg
W=200
H=200
GreyScale=1
ImageTint=171,54,3,150
[MeasureMyPictures]
Measure=Plugin
Plugin=QuotePlugin
PathName=#@#\Pictures
Subfolders=0
FileFilter=*.jpg;*.gif;*.bmp;*.png
UpdateDivider=10
[MeterShowPicture]
Meter=Image
MeasureName=MeasureMyPictures
X=25
Y=25
W=150
H=150
PreserveAspectRatio=1
LeftMouseUpAction=[!Refresh]
```
--------------------------------
### C++ Plugin Development Example
Source: https://docs.rainmeter.net/developers
This snippet demonstrates the basic structure and build process for a C++ Rainmeter plugin using Visual Studio. It involves creating a new project from the PluginEmpty template and building both 32-bit and 64-bit release versions.
```C++
#include
// Example function for a Rainmeter plugin
__declspec(dllexport) int Initialize(void* data) {
// Plugin initialization code
return 0;
}
__declspec(dllexport) void Shutdown(void* data) {
// Plugin shutdown code
}
// Add other plugin functions as needed
```
```Visual Studio Project
Debug
Win32
Release
Win32
Debug
x64
Release
x64
```
--------------------------------
### Specify Rainmeter Version
Source: https://docs.rainmeter.net/manual/distributing-skins
Defines the minimum required Rainmeter version for a skin to be installed. Versions are specified in Major.Minor.Patch.Revision format. Examples show how to target specific versions or ranges.
```plaintext
4.0.0.2551
4
4.2
4.2.0.3111
```
--------------------------------
### Switch Skin Variant Example
Source: https://docs.rainmeter.net/manual/getting-started/using-rainmeter
Shows how to switch between different variants of a skin, such as '2 Disks.ini' and '1 Disk.ini', through the skin's context menu. Only one variant of a skin can be active at a time, and they share the same location and settings.
```Rainmeter Configuration
Variants -> 1 Disk.ini
```
--------------------------------
### Change String Meter Color and Style on Hover
Source: https://docs.rainmeter.net/tips/setoption-guide
Demonstrates how to change the FontColor and StringStyle of a String meter when the mouse hovers over it using the !SetOption bang. This example changes the color to green and style to bold.
```Rainmeter
[MeterOne]
Meter=String
FontColor=255,0,0,255
Text="Hello World"
MouseOverAction=[!SetOption MeterOne FontColor 0,255,0,255][!SetOption MeterOne StringStyle Bold]
```
--------------------------------
### Building Rainmeter Source Code with Visual Studio
Source: https://docs.rainmeter.net/developers
Instructions on how to open and build the Rainmeter project using Microsoft Visual Studio. This involves downloading the source code, opening the Rainmeter.sln file, and configuring solution settings for different architectures.
```Batch
REM Example of setting up Visual Studio build configuration (conceptual)
REM Open Rainmeter.sln in Visual Studio
REM Set Solution Configuration to 'Debug' or 'Release'
REM Set Solution Platforms to 'x32' or 'x64'
REM Build the solution
```
--------------------------------
### Rainmeter Rad() Function Example
Source: https://docs.rainmeter.net/tips/radians-guide
Demonstrates the use of Rainmeter's built-in Rad() function to convert degrees to radians within a meter's configuration. This function simplifies angle calculations in Rainmeter.
```Rainmeter
StartAngle=(Rad(270))
```
--------------------------------
### Rainmeter: Rotate Meter 30 Degrees Counterclockwise
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
This example demonstrates how to use the TransformationMatrix in Rainmeter to rotate a meter 30 degrees counterclockwise around its center. The matrix values define the rotation and translation.
```ini
TransformationMatrix=0.86602;-0.5;0.5;0.86602;-36.6025;63.3975
```
--------------------------------
### Backup Rainmeter Skins and Plugins
Source: https://docs.rainmeter.net/tips/clean-rainmeter-uninstall
Before uninstalling Rainmeter, back up your custom skins and plugins by copying the contents of the Skins and Plugins directories to a safe location. This ensures you don't lose your personalized Rainmeter setups.
```Windows Batch
REM Copy skins to a backup location
xcopy /E /I "C:\Users\_YourName_\Documents\Rainmeter\Skins" "C:\Path\To\Backup\Skins"
REM Copy plugins to a backup location
xcopy /E /I "C:\Users\_YourName_\AppData\Roaming\Rainmeter\Plugins" "C:\Path\To\Backup\Plugins"
```
--------------------------------
### Rainmeter String Meter - Notepad Launcher
Source: https://docs.rainmeter.net/manual/getting-started/basic-tutorials/launcher
Defines a String meter to display 'Notepad' and act as a launcher for Notepad.exe when clicked. It includes formatting and a mouse action for launching the application.
```Rainmeter
[MeterLaunch1]
Meter=String
X=5
Y=5
FontFace=Trebuchet MS
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=Notepad
SolidColor=0,0,0,1
LeftMouseUpAction=["C:\\Windows\\System32\\Notepad.exe"]
```
--------------------------------
### Create Basic Rectangle Shape
Source: https://docs.rainmeter.net/manual/meters/shape
This example demonstrates the most basic usage of the Shape meter to create a rectangle. It defines the shape type, its starting position (X, Y), width, and height. By default, it will have a white fill and a 1-pixel black stroke.
```ini
[MeterShape]
Meter=Shape
Shape=Rectangle 0,0,100,50
```
--------------------------------
### Rainmeter: Rotate Meter 30 Degrees Clockwise
Source: https://docs.rainmeter.net/tips/transformation-matrix-guide
This example shows how to rotate a Rainmeter meter 30 degrees clockwise by adjusting the TransformationMatrix values. Swapping 'b' and 'c' and recalculating 'tx' and 'ty' achieves the clockwise rotation.
```ini
TransformationMatrix=0.86602;0.5;-0.5;0.86602;63.3975;-36.6025
```
--------------------------------
### Rainmeter Configuration Section Example
Source: https://docs.rainmeter.net/manual/settings/skin-sections
Demonstrates the structure of a skin section within Rainmeter's configuration file (Rainmeter.ini). This section defines how a specific skin is loaded and displayed.
```INI
[illustro\Clock]
Meter=String
MeasureName=MeasureClock
Text="Hello, World!"
```
--------------------------------
### Rainmeter CPU Usage Circle Meter
Source: https://docs.rainmeter.net/tips/radians-guide
This snippet shows how to configure a Rainmeter Roundline meter to display CPU usage. It uses a CPU measure and sets the StartAngle to 270 degrees and RotationAngle to 360 degrees to create a full circle starting from the top.
```ini
[MeasureCPU]
Measure=CPU
[MeterCPUCircle]
Meter=Roundline
MeasureName=MeasureCPU
W=40
H=40
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineWidth=5
LineStart=15
LineLength=20
LineColor=255,255,255,255
Solid=1
AntiAlias=1
```
--------------------------------
### Rainmeter InputText Plugin Example
Source: https://docs.rainmeter.net/manual/plugins/inputtext
This Rainmeter configuration demonstrates the use of the InputText plugin to capture user input. It allows users to enter text, which is then written to a file and used to update variables within the Rainmeter skin. The configuration includes sections for defining variables, setting up a background, and displaying the input text dynamically.
```rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
[Variables]
FirstVar=!WriteKeyValue
SecondVar=!SetVariable
FontSize=14
[MeterBackground]
Meter=Image
SolidColor=1E3A69FF
W=250
H=105
[MeasureInput]
Measure=Plugin
Plugin=InputText
SolidColor=76A0E8FF
FontColor=255,255,255,255
FontFace=Seqoe UI
StringStyle=Italic
FontSize=#FontSize#
X=5
Y=5
H=25
W=240
DefaultValue="Change Me!"
Command1=!WriteKeyValue Variables FirstVar "$UserInput$" "#CURRENTPATH#InputText.inc"
Command2=!Refresh #CURRENTCONFIG#
Command3=!SetVariable SecondVar "$UserInput$" Y=40 DefaultValue="Change Me Too!"
Command4=["$UserInput$"] Y=75 DefaultValue="Text file path and name"
[MeterWriteKeyValue]
Meter=String
X=5
Y=5
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
Text=#FirstVar#
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 1-2"
[MeterSetVariable]
Meter=String
X=5
Y=10R
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
DynamicVariables=1
Text=#SecondVar#
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 3"
[MeterOpenEditor]
Meter=String
X=5
Y=10R
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
DynamicVariables=1
Text=Open Text File
LeftMouseUpAction=!CommandMeasure "MeasureInput" "ExecuteBatch 4"
```
--------------------------------
### PerfMon Plugin Configuration Example
Source: https://docs.rainmeter.net/manual/plugins/deprecated/perfmon
This example demonstrates how to use the PerfMon plugin to retrieve system information, such as the number of running processes and disk access speed. It configures measures for these values and displays them using string meters.
```Rainmeter
[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255
[MeasureProcessCount]
; Measures the number of processes running.
Measure=Plugin
Plugin=PerfMon
PerfMonObject=System
PerfMonCounter=Processes
PerfMonDifference=0
[MeasureDiskAccess]
; Measures disk access of the C: drive.
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Bytes/sec
PerfMonInstance=C:
[MeterProcessCount]
Meter=String
MeasureName=MeasureProcessCount
X=5
Y=5
W=200
H=20
FontColor=255,255,255,255
Text=Total processes: %1
[MeterDiskAccess]
Meter=String
MeasureName=MeasureDiskAccess
X=5
Y=25
W=200
H=20
FontColor=255,255,255,255
AutoScale=1
Text=Disk access: %1B/sec
```
--------------------------------
### Changing Skin Pages with !WriteKeyValue and !Refresh
Source: https://docs.rainmeter.net/tips/include-guide
Provides an example of how to dynamically change the loaded page of a Rainmeter skin. This is achieved by using the `[!WriteKeyValue Variables Page X]` bang to update the page variable, followed by `[!Refresh]` to reload the skin with the new page.
```Rainmeter
[!WriteKeyValue Variables Page 2][!Refresh]
```
--------------------------------
### Display and Launch Application with Image Meter
Source: https://docs.rainmeter.net/manual/getting-started/basic-tutorials/launcher
This snippet demonstrates how to use the Image meter to display an image and set a left mouse click action to launch an application. It includes setting the image source, dimensions, and relative positioning.
```ini
[MeterLaunch3Image]
Meter=Image
ImageName=#@#Images\Calc.png
W=32
H=32
X=0r
Y=2R
LeftMouseUpAction=["Calc.exe"]
```
--------------------------------
### Create Rainmeter Clock Skin
Source: https://docs.rainmeter.net/manual/getting-started/basic-tutorials/clock
This snippet outlines the initial steps for creating a Rainmeter clock skin. It involves creating a specific folder structure within Rainmeter's skins directory and creating a new text file named Clock.ini.
```INI
[Rainmeter]
Update=1000
[MeterClock]
Meter=String
FontFace=Segoe UI
FontSize=20
FontColor=255,255,255
StringAlign=Center
AntiAlias=1
[MeasureTime]
Measure=Time
Format=HH:nn:ss
```
--------------------------------
### Rainmeter WebParser RegExp Iteration Example
Source: https://docs.rainmeter.net/tips/webparser-debugging-regexp
Shows an iterative approach to building a RegExp for Rainmeter's WebParser. It starts with a simple RegExp to capture an IP address and demonstrates how to progressively add more capture groups for other data points like country, region, and city.
```Rainmeter
[MeasureSite]
Measure=WebParser
URL=http://www.tell-my-ip.com/index.html
RegExp=(?siU)Your IP Address.*| (.*) |
[MeasureIP]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
```
```Rainmeter
[MeasureSite]
Measure=WebParser
URL=http://www.tell-my-ip.com/index.html
RegExp=(?siU)Your IP Address.*(.*) | .*Country:.*
(.*).*Region.* | (.*) | .*City.* | (.*) | .*ISP:.* | (.*) | .*Latitude:.* | (.*) | .*Longitude:.* | (.*) |
```
--------------------------------
### Practical Use: Skin Pages with @include and Variables
Source: https://docs.rainmeter.net/tips/include-guide
Shows how to implement different pages within a single Rainmeter skin using @include and variables. Each page is in a separate file, and a variable in the parent skin controls which page is loaded.
```Rainmeter
[Variables]
Page=1
@include=Pages\PageNum#Page#.inc
```
--------------------------------
### Unload Skin Example
Source: https://docs.rainmeter.net/manual/getting-started/using-rainmeter
Illustrates the process of unloading a currently active skin using the context menu. Unloading a skin removes it from the desktop but retains its saved location and settings for future use.
```Rainmeter Configuration
Unload skin
```
--------------------------------
### Rainmeter Metadata Section
Source: https://docs.rainmeter.net/manual/distributing-skins
Utilize the [Metadata] section for discoverability and to provide essential information like setup instructions and versioning. This helps users find and understand skins.
--------------------------------
### Rainmeter WebParser UpdateRate Example
Source: https://docs.rainmeter.net/tips/update-guide
This Rainmeter snippet illustrates the use of UpdateRate with the WebParser plugin to control the download frequency of a web resource. It sets the WebParser to download a Gmail atom feed every 1200 seconds (20 minutes) to check for new mail count.
```Rainmeter
[MeasureMailCount]
Measure=WebParser
URL=https://username:pasword@gmail.google.com/gmail/feed/atom
RegExp="(?siU)(.*)"
StringIndex=1
UpdateRate=1200
```
--------------------------------
### ResMon Plugin Example for GDI Handles
Source: https://docs.rainmeter.net/manual/plugins/resmon
This example demonstrates how to use the ResMon plugin to measure and display GDI handle usage for both the entire system and a specific process (Rainmeter.exe). It includes measure definitions and a string meter to present the data.
```Rainmeter
[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255
[MeasureSystemGDI]
Measure=Plugin
Plugin=Resmon
ResCountType=GDI
[MeasureRainmeterGDI]
Measure=Plugin
Plugin=Resmon
ResCountType=GDI
ProcessName="Rainmeter.exe"
[MeterOne]
Meter=String
MeasureName=MeasureSystemGDI
MeasureName2=MeasureRainmeterGDI
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=GDI Handles: %1 (Rainmeter: %2)
```