-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Implement ability to show text in the system tray/menu bar #65
Comments
On windows they are called deskbands, they don't live in the system tray exactly but rather next to it. Edit: Looks like Deskbands will not be supported in Windows11 :sad:, and AFAIK not possible at all in Linux, so this feature will be only for macOS. |
I would be greatly interested in setting text for the systray on macos, I've been looking in the rust community a crate for the system tray, with this one https://github.com/olback/tray-item-rs/blob/master/src/api/macos/mod.rs, you can set a title (and for linux it just set it as the id and for windows set the tooltip) - just wanted to point out how it's implemented there |
'Tooltips" on Windows and "Id" on Linux is not the same as showing text instead of the icon. |
I totally agree with your statement, they are not equivalent of showing text - was just stating what another crate is doing, alongside a possible macos implementation of showing text in the system tray/menu bar (they are using Let me come up with a PR for setting the title. |
Wondering if this is possible for Linux also. I'd want it for my WIP app. From searching the webs I can't really figure out whether it's possible or not. My best attempt was this search: This search is also interesting: https://wiki.ayatana-indicators.org/SystemComponents I'm not sure if I'm looking at the right things. |
Unfortunately, not possible, at least with the old |
I'm having trouble finding documentation, too :( the best I could find were the Rust bindings for it https://docs.rs/libayatana-appindicator Note that it does have a |
I managed to build a PoC using gtk::init().unwrap();
let mut indicator = AppIndicator::new("some-name", "");
indicator.set_status(AppIndicatorStatus::Active);
indicator.set_label(" This will display next to the icon", "");
let icon_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("icons");
indicator.set_icon_theme_path(icon_path.to_str().unwrap());
indicator.set_icon_full("icon", "icon"); So it's possible! |
Now the only problem left is that ayatana is basically only existent on debian/ubuntu 😅 Most of the other distros, and flatpaks, still use libappindicator. Edit: nvm, libappindicator does seem to have a set_label function too. |
this is now being implemented in tauri-apps/tray-icon#11, it will not be implemented in |
Just a heads up, I am testing on KDE and the text is not showing, so after some digging in the source code of libappindicator I found the label documentation.
So you shouldn't rely on it for critical information. |
Use case: apps like MeetingBar show text instead of a system tray icon.
I'd love the ability to do this with Tauri:
However, I'm not sure if this is even possible in other operating systems. With that in mind, maybe it doesn't fit Tauri's philosophy to add a feature that will only work on macos!
The text was updated successfully, but these errors were encountered: