2 releases

0.1.1 Mar 6, 2024
0.1.0 Dec 27, 2023

#42 in Accessibility

Download history 3/week @ 2023-12-27 3/week @ 2024-02-21 11/week @ 2024-02-28 158/week @ 2024-03-06 81/week @ 2024-03-13 9/week @ 2024-03-27 16/week @ 2024-04-03

109 downloads per month

MIT/Apache

160KB
3K SLoC

crates.io

sem-reg

A Rust library crate for Windows that abstracts binary registry values, so they can be handled semantically.

Currently, these registry values are handled:

  • Those of the Night Light feature. Includes a command line program (see below).

Since the knowledge about the undocumented registry values must be acquired through own investigation and not every unclarity can be resolved, this isn't an exact science. This implies that the parsing helpers, because of their potentially shape-shifting nature, aren't provided as their own crate, and handling of different registry values is done "in-house" in this repository for the time being. When you want to add your parsing code for other registry values, please approach me to include it in the crate (unless you solved all previously mentioned problems).

The API isn't stable. Future requirements of handling other registry values or more insights into the values' formats may necessitate changes.

night-light Command Line Program

  • Allows you to adjust Night Light's active-state, color temperature, preview state and schedule.
  • Corrects Windows bugs like warm color temperature being reset to cold after turning the screen back on.
  • Allows for gamma correction for a more uniform color temperature transition.
  • There are also a few extra subcommands, like for exporting the registry values.
  • The most sophisticated Night Light tool out there. Make sure to read the help of the subcommands.

Binaries are available on the releases page. Not every version may be provided there.

To install the newest version, first install Rust to get cargo, then run:

cargo install sem-reg --bin night-light

This will also automatically make it available in the PATH.

Similar Software

The nightlight crate offers a library and command line program for macOS to control the screen color temperature.

For Linux, ways to control GNOME's Night Light or KDE's Night Color from the command line can easily be researched.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~169MB
~3M SLoC