I want to track if a value of the registry key changes. Maybe something like notify but for registry. Right now I'm getting registry value with help of windows-registry.
code:
pub fn is_light_theme() -> bool {
let val = CURRENT_USER
.open(r#"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"#)
.expect("Failed to get registry key")
.get_u32("AppsUseLightTheme")
.expect("Failed to get registry value");
println!("{}", val);
val != 0
}