Embed modern web content directly into your Rainmeter skins with full JavaScript interactivity
๐ฅ Download โข ๐ Documentation โข ๐ก Examples โข ๐ค Contributing
๐ Modern Web Engine
Powered by Microsoft Edge WebView2, supporting:
- โ HTML5, CSS3, JavaScript ES6+
- โ Modern frameworks (React, Vue, Svelte)
- โ WebGL, Canvas, SVG animations
- โ Transparent backgrounds by default
๐ Seamless JavaScript Bridge
Two-way communication between web and Rainmeter:
- โ Call Rainmeter API from JavaScript
- โ Execute JavaScript from Rainmeter
- โ Real-time data synchronization
- โ Custom events and callbacks
โก Dynamic & Flexible
- โ Load local HTML or remote URLs
- โ Multiple WebView instances per skin
- โ Hot-reload without flickering
- โ Developer tools (F12) built-in
Before you begin, make sure you have:
| Requirement | Version | Status |
|---|---|---|
| Windows | 10 (1803+) or 11 | |
| Rainmeter | 4.5 or higher | |
| WebView2 Runtime | Latest |
๐ฆ Don't have WebView2 Runtime?
Good news! Windows 11 includes it by default. For Windows 10:
- ๐ Download WebView2 Runtime
- ๐ฏ Choose "Evergreen Standalone Installer"
- โก Run the installer (takes ~1 minute)
The easiest way to get started!
- ๐ฆ Download the
.rmskinfile - ๐ฑ๏ธ Double-click to install
- โจ Done! Plugin and examples are ready to use
Rainmeter will automatically install everything you need
Click to expand manual installation steps
-
Download the plugin DLLs from Releases
-
Choose the right version:
๐ x64/WebView2.dll โ For 64-bit Rainmeter (most common) ๐ x32/WebView2.dll โ For 32-bit Rainmeter -
Copy to your Rainmeter plugins folder:
%AppData%\Rainmeter\Plugins\ -
Restart Rainmeter
Create a new skin with this minimal configuration:
[Rainmeter]
Update=1000
[MeasureWebView]
Measure=Plugin
Plugin=WebView2
URL=file:///#@#index.html
W=800
H=600Create index.html in your @Resources folder:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
font-family: 'Segoe UI', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
h1 { font-size: 3em; animation: fadeIn 1s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
</style>
</head>
<body>
<h1>๐ Hello Rainmeter!</h1>
</body>
</html>That's it! Load the skin and see your first WebView in action.
| Option | Description | Default | Example |
|---|---|---|---|
URL |
๐ HTML file or web URL Supports: file:///, http://, https:// |
Required | file:///#@#index.html |
W |
๐ Width in pixels | 800 | 1920 |
H |
๐ Height in pixels | 600 | 1080 |
X |
0 | 100 |
|
Y |
0 | 50 |
|
Hidden |
๐๏ธ Start hidden 0 = visible, 1 = hidden |
0 | 1 |
Clickthrough |
๐ฑ๏ธ Mouse interaction 0 = interactive, 1 = clickthrough |
0 | 1 |
DynamicVariables |
๐ Enable live updates | 0 | 1 |
๐ก Pro Tip: When
DynamicVariables=1, the WebView updates smartly:
- URL changes โ Navigates without recreating
- Size/Position changes โ Applied instantly, no flicker
- Visibility changes โ Instant toggle
Control your WebView with Rainmeter bangs:
|
Navigation Commands ; Go to a URL
[!CommandMeasure MeasureWebView "Navigate https://example.com"]
; Reload current page
[!CommandMeasure MeasureWebView "Reload"]
; Browser history
[!CommandMeasure MeasureWebView "GoBack"]
[!CommandMeasure MeasureWebView "GoForward"] |
Control Commands ; Execute JavaScript
[!CommandMeasure MeasureWebView "ExecuteScript alert('Hi!')"]
; Developer tools
[!CommandMeasure MeasureWebView "OpenDevTools"] |
Your JavaScript can respond to Rainmeter events:
// Called once when plugin is ready
window.OnInitialize = function() {
console.log("๐ WebView initialized!");
return "Ready!"; // This becomes the measure's value
};
// Called on every Rainmeter update
window.OnUpdate = function() {
const now = new Date().toLocaleTimeString();
return now; // Updates measure value
};
โ ๏ธ Note: JavaScript execution is asynchronous, so there's a 1-update delay between JS return and Rainmeter display. This is normal!
Use section variables to call any JavaScript function:
[MeterTemperature]
Meter=String
Text=Current temp: [MeasureWebView:CallJS('getTemperature')]ยฐC
DynamicVariables=1// In your HTML
window.getTemperature = function() {
return 72;
};Access Rainmeter's full power from JavaScript:
// Read from your measure
const refreshRate = await RainmeterAPI.ReadInt('UpdateRate', 1000);
const siteName = await RainmeterAPI.ReadString('SiteName', 'Default');
// Read from other sections
const cpuUsage = await RainmeterAPI.ReadStringFromSection('MeasureCPU', 'Value', '0');// Set variables
await RainmeterAPI.Bang('!SetVariable MyVar "Hello World"');
// Control skins
await RainmeterAPI.Bang('!ActivateConfig "MySkin" "Variant.ini"');
// Update meters
await RainmeterAPI.Bang('!UpdateMeter MeterName');
await RainmeterAPI.Bang('!Redraw');const skinName = await RainmeterAPI.SkinName;
const measureName = await RainmeterAPI.MeasureName;
// Replace variables
const path = await RainmeterAPI.ReplaceVariables('#@#images/logo.png');
// Get variable values
const theme = await RainmeterAPI.GetVariable('CurrentTheme');await RainmeterAPI.Log('Debug info', 'DEBUG');
await RainmeterAPI.Log('Warning message', 'WARNING');
await RainmeterAPI.Log('Error occurred', 'ERROR');๐ Click to see all available methods
Reading Options
ReadString(option, defaultValue)โPromise<string>ReadInt(option, defaultValue)โPromise<number>ReadDouble(option, defaultValue)โPromise<number>ReadFormula(option, defaultValue)โPromise<number>ReadPath(option, defaultValue)โPromise<string>
Reading from Sections
ReadStringFromSection(section, option, defaultValue)โPromise<string>ReadIntFromSection(section, option, defaultValue)โPromise<number>ReadDoubleFromSection(section, option, defaultValue)โPromise<number>ReadFormulaFromSection(section, option, defaultValue)โPromise<number>
Utility Functions
ReplaceVariables(text)โPromise<string>GetVariable(variableName)โPromise<string>PathToAbsolute(relativePath)โPromise<string>Bang(command)โPromise<void>Log(message, level)โPromise<void>
Properties
MeasureNameโPromise<string>SkinNameโPromise<string>SkinWindowHandleโPromise<string>SettingsFileโPromise<string>
The plugin includes ready-to-use example skins:
|
๐ Clock Animated liquid clock with smooth animations |
๐
Calendar Interactive month view calendar |
โ๏ธ Config Reader Read options from measures and sections |
๐ง Utilities Demonstrate all API functions |
To explore examples:
- Install the
.rmskinpackage - Check your Rainmeter skins folder
- Load example skins from Rainmeter manager
For Developers: Build Instructions
- Visual Studio 2022 with C++ desktop development
- Windows SDK
- PowerShell 5.1+
# Clone repository
git clone https://github.com/yourusername/WebView2.git
cd WebView2
# Open in Visual Studio
start WebView2-Plugin.sln
# Build with PowerShell
powershell -ExecutionPolicy Bypass -Command "& {. .\Build-CPP.ps1; Dist -major 0 -minor 0 -patch 3}"๐ dist/
โโโ ๐ x64/
โ โโโ WebView2.dll
โโโ ๐ x32/
โ โโโ WebView2.dll
โโโ WebView2_v0.0.3_x64_x86_dll.zip
โโโ WebView2_v0.0.3_Alpha.rmskin
โ "WebView2 Runtime is not installed"
Solution: Install WebView2 Runtime
Windows 11 has it pre-installed. For Windows 10, download and run the installer.
โ "Failed to create WebView2 controller"
Try these steps:
- โ Right-click skin โ Refresh skin
- โ Restart Rainmeter completely
- โ Verify WebView2 Runtime is installed
- โ Check Windows Event Viewer for detailed errors
โ "RainmeterAPI is not defined" in JavaScript
Solution: Wait for page to load before accessing API:
document.addEventListener('DOMContentLoaded', () => {
// Now you can use RainmeterAPI
RainmeterAPI.Log('Page loaded!', 'DEBUG');
});โ WebView not visible
Checklist:
- โ
Ensure
Hidden=0in your measure (default is 0) - โ Check URL path is correct
- โ Verify HTML file exists
- โ Look for errors in Rainmeter log
- โ
Try:
[!CommandMeasure MeasureName "OpenDevTools"]to debug
Transparency tip: The WebView has transparent background by default. Use background: transparent; in your CSS.
MIT License - Free to use, modify, and distribute
See LICENSE file for full details
We welcome contributions! Here's how:
|
1. Fork ๐ด Fork this repo |
2. Branch ๐ฟ Create feature branch |
3. Code ๐ป Make your changes |
4. Commit ๐ Commit with clear message |
5. PR ๐ Open Pull Request |
git checkout -b feature/AmazingFeature
git commit -m 'Add some AmazingFeature'
git push origin feature/AmazingFeatureBuilt with powerful tools and inspired by the community
Microsoft Edge WebView2 โข Rainmeter API โข Rainmeter Community