diff --git a/src/main.rs b/src/main.rs index 8bd4d43..fa9e87f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,9 +59,15 @@ async fn socket_server(disabled: Arc, notify: Arc) { let now = Local::now(); let (cur_temp, cur_gamma) = compute_settings(now); + let body = if disabled.load(Ordering::SeqCst) { + "disabled".to_string() + } else { + format!("temp: {}K, gamma: {}%", cur_temp, cur_gamma) + }; + match Notification::new() .summary("Sunsetting") - .body(format!("temp: {}K, gamma: {}%", cur_temp, cur_gamma).as_str()) + .body(body.as_str()) .timeout(notify_rust::Timeout::Milliseconds(NOTIFICATION_TIMEOUT)) .show_async() .await