diff --git a/src/notification.rs b/src/notification.rs new file mode 100644 index 0000000..64286f1 --- /dev/null +++ b/src/notification.rs @@ -0,0 +1,14 @@ +use notify_rust::Notification; + +pub fn send_desktop_notification(title: &str, body: &str) { + let title = title.to_string(); + let body = body.to_string(); + + std::thread::spawn(move || { + let _ = Notification::new() + .summary(&title) + .body(&body) + .appname("termato") + .show(); + }); +}