Replies: 2 comments
-
You can copy it until your software starts, just create a tray instance |
Beta Was this translation helpful? Give feedback.
-
Here's how I did it, you might find it helpful to refer to:
let icon_path = app.path().resolve("icons/tray.png", tauri::path::BaseDirectory::Resource)?;
let tray_icon = TrayIconBuilder::new()
.icon_as_template(true)
.icon(tauri::image::Image::from_path(icon_path).unwrap()); Here's a more detailed explanation: Modify the In your First, determine the path to your tray icon image. This is done by resolving the path to "icons/tray.png" relative to the application's resource directory |
Beta Was this translation helpful? Give feedback.
-
😅
I have a preact vite hello world app working (on macos arm).
I'm here https://tauri.app/plugin/system-tray/ looking at the javascript examples. I'm not sure where to paste these snippets or if there is another start() method to call somewhere. But so far nothing is showing up in my menubar.
edit:
using the rust api works if you set the .icon()
Beta Was this translation helpful? Give feedback.
All reactions