Skip to content

NSTechBytes/NightLight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NightLight - Rainmeter Plugin

A Rainmeter plugin for controlling Windows 10/11 Night Light feature directly from your Rainmeter skins.

Features

  • Check if Night Light is supported on your system
  • Get current Night Light state (enabled/disabled)
  • Enable/Disable Night Light
  • Toggle Night Light
  • Get/Set Night Light strength (0-100%)

Installation

  1. Build the plugin using Build.ps1 or Visual Studio
  2. Copy the compiled NightLight.dll to your Rainmeter plugins folder:
    • For 64-bit: %APPDATA%\Rainmeter\Plugins\
    • For 32-bit: %APPDATA%\Rainmeter\Plugins\

Usage

Check if Night Light is Supported

[Measure_NightLight]
Measure=Plugin
Plugin=NightLight
Type=Supported

Returns:

  • 1 if Night Light is supported
  • -1 if not supported

Get Night Light State

[Measure_NightLight]
Measure=Plugin
Plugin=NightLight
Type=State

Returns:

  • 1 if Night Light is enabled
  • -1 if Night Light is disabled

Get Night Light Strength

[Measure_Strength]
Measure=Plugin
Plugin=NightLight
Type=Strength

Returns: 0-100 (percentage)

Control Night Light

Enable Night Light

[!CommandMeasure Measure_NightLight "Enable"]

Disable Night Light

[!CommandMeasure Measure_NightLight "Disable"]

Toggle Night Light

[!CommandMeasure Measure_NightLight "Toggle"]

Set Strength (0-100%)

[!CommandMeasure Measure_NightLight "Strength 50"]

Building from Source

Requirements

  • Visual Studio 2019 or later
  • .NET Framework 4.8
  • Windows 10/11

Build Steps

  1. Open NightLight.sln in Visual Studio
  2. Select your target platform (x86 or x64)
  3. Build the solution (Ctrl+Shift+B)

Or use PowerShell:

# Build for x64 Release
.\Build.ps1 -Configuration Release -Platform x64

# Build for x86 Release
.\Build.ps1 -Configuration Release -Platform x86

Technical Details

The plugin manipulates Windows registry keys to control Night Light:

  • State: HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.bluelightreductionstate\windows.data.bluelightreduction.bluelightreductionstate
  • Settings: HKCU\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\DefaultAccount\Current\default$windows.data.bluelightreduction.settings\windows.data.bluelightreduction.settings

License

This plugin is provided as-is for use with Rainmeter.

About

A Rainmeter plugin for controlling Windows 10/11 Night Light feature directly from your Rainmeter skins.

Topics

Resources

License

Stars

Watchers

Forks

Contributors