feat: Add NO_TRAY_ICON to compilation to disable tray in binary

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-09-25 19:30:54 +10:00
parent db485b946b
commit 42ff3b1331

View File

@ -486,6 +486,9 @@ fn run_on_tray<T: FnOnce()>(f: T) {
if match std::env::var("NO_TRAY_ICON") {
Ok(s) => s.to_lowercase() != "true",
Err(_) => true,
} || match option_env!("NO_TRAY_ICON") {
Some(s) => s.to_lowercase() != "true",
None => true,
} {
(f)();
}