Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: show an icon in desktop notification #442

Open
merv4 opened this issue Mar 13, 2025 · 0 comments
Open

feature request: show an icon in desktop notification #442

merv4 opened this issue Mar 13, 2025 · 0 comments

Comments

@merv4
Copy link

merv4 commented Mar 13, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant