Files
termato/src/notification.rs
T

15 lines
311 B
Rust

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();
});
}