From dc1b08095c48a8e954b4ff2b62cc96df0f0705e9 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn Date: Tue, 28 Jul 2026 09:32:31 -0500 Subject: [PATCH] refactor: extract notification sending --- src/notification.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/notification.rs 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(); + }); +}