System Tray
Tauri allows you to create and customize a system tray for your application. This can enhance the user experience by providing quick access to common actions.
Configuration
First of all, update your Cargo.toml
to include the necessary feature for the system tray.
Creating the system tray in Rust
- Create a
tray.rs
file in thesrc
directory with this code:
If you prefer, you can also inline this code into lib.rs
.
- Initialize the tray:
Now you can call the function declared above in lib.rs
:
© 2024 Tauri Contributors. CC-BY / MIT