diff options
| author | salmonik <raisersoft@proton.me> | 2026-05-15 16:55:50 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-05-15 16:55:50 +0200 |
| commit | 071a3ad4cd588843e73ef66a5c44a32beb4ec75e (patch) | |
| tree | 4abb0a6a75fc0bb9363e407a213aafb8cea9cde2 /src/notification.rs | |
| parent | Regenerate shell completions and install script fixes (diff) | |
| download | rsplayer-071a3ad4cd588843e73ef66a5c44a32beb4ec75e.tar.gz rsplayer-071a3ad4cd588843e73ef66a5c44a32beb4ec75e.zip | |
aesthetic changes
Diffstat (limited to '')
| -rw-r--r-- | src/notification.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/notification.rs b/src/notification.rs index 4947e6f..df9c622 100644 --- a/src/notification.rs +++ b/src/notification.rs | |||
| @@ -18,7 +18,7 @@ pub fn notify_track(track: &Track, format: Option<&str>) { | |||
| 18 | let _ = notify_rust::Notification::new() | 18 | let _ = notify_rust::Notification::new() |
| 19 | .summary("Now Playing") | 19 | .summary("Now Playing") |
| 20 | .body(&body) | 20 | .body(&body) |
| 21 | .appname("rsp") | 21 | .appname("RSPlayer") |
| 22 | .show(); | 22 | .show(); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| @@ -26,14 +26,22 @@ pub fn notify_queue_ended() { | |||
| 26 | let _ = notify_rust::Notification::new() | 26 | let _ = notify_rust::Notification::new() |
| 27 | .summary("Playback Ended") | 27 | .summary("Playback Ended") |
| 28 | .body("The queue is empty") | 28 | .body("The queue is empty") |
| 29 | .appname("rsp") | 29 | .appname("RSPlayer") |
| 30 | .show(); | ||
| 31 | } | ||
| 32 | |||
| 33 | pub fn notify_change(state: &str) { | ||
| 34 | let _ = notify_rust::Notification::new() | ||
| 35 | .summary(state) | ||
| 36 | .body(&format!("Playback {}", state.to_lowercase())) | ||
| 37 | .appname("RSPlayer") | ||
| 30 | .show(); | 38 | .show(); |
| 31 | } | 39 | } |
| 32 | 40 | ||
| 33 | pub fn notify_error(context: &str) { | 41 | pub fn notify_error(context: &str) { |
| 34 | let _ = notify_rust::Notification::new() | 42 | let _ = notify_rust::Notification::new() |
| 35 | .summary("rsp Error") | 43 | .summary("RSPlayer Error") |
| 36 | .body(&format!("{} - Check the logs for details", context)) | 44 | .body(&format!("{} - Check the logs for details", context)) |
| 37 | .appname("rsp") | 45 | .appname("RSPlayer") |
| 38 | .show(); | 46 | .show(); |
| 39 | } | 47 | } |
