#Creating multiple windows

5 messages · Page 1 of 1 (latest)

thorny shore
#

I am trying to build something like Raycast when I have a window that can be triggered open using an hotkey, while having an full screen app. I want a system tray daemon to run on startup, and then the app to open when I actually click on the application and the small portal to open when I press a certain keybind. How do I go about this?

tired snow
#

I want a system tray daemon to run on startup
https://github.com/tauri-apps/plugins-workspace/tree/dev/plugins/autostart
For minimum resource usage you wouldn't want to spawn any hidden windows but that leaves you with js-only. if you need js from the get-go you can spawn hidden windows (visible: false).

the app to open when I actually click on the application
system tray events (rust only) https://tauri.app/v1/guides/features/system-tray#listening-to-system-tray-events

the small portal to open when I press a certain keybind.
global_shortcut api (available in both rust and js) https://tauri.app/v1/api/js/globalShortcut (js) / https://github.com/tauri-apps/tauri/blob/b02fc90f450ff9e9d8a35ee55dc1beced4957869/examples/api/src-tauri/src/main.rs#L199-L209 (rust example)
If you don't spawn hidden windows in 1) you need to use the rust side.

thorny shore
tired snow