Skip to content

feature request: show an icon in desktop notification #442

@mervn

Description

@mervn

Tiny notifications currently do not display (or request) an icon. This is negligible but can be jarring in some environments where every notification has an icon.

Here is a patch:

--- a/crates/libtiny_tui/src/notifier.rs
+++ b/crates/libtiny_tui/src/notifier.rs
@@ -33,7 +33,7 @@ impl Default for Notifier {
 #[cfg(feature = "desktop-notifications")]
 fn notify(summary: &str, body: &str) {
     // TODO: Report errors somehow
-    let _ = Notification::new().summary(summary).body(body).show();
+    let _ = Notification::new().summary(summary).body(body).icon("tiny").show();
 }
 
 #[cfg(not(feature = "desktop-notifications"))]

This patch works whether or not an icon is available, but I can only make this claim from my machine. It's likely notify-rust is robust enough to handle missing icons.

I've included this as an issue instead of a PR to see if there's interest in generalizing this (user chooses name of icon in config; maybe per server?) and to discuss if tiny could get an official icon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions