fix("status_notify"): show disabled status
This commit is contained in:
parent
65433f3560
commit
e3c1434431
1 changed files with 7 additions and 1 deletions
|
@ -59,9 +59,15 @@ async fn socket_server(disabled: Arc<AtomicBool>, notify: Arc<Notify>) {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue