tao icon indicating copy to clipboard operation
tao copied to clipboard

macOS: Dock management

Open probablykasper opened this issue 3 years ago • 9 comments

Ability to hide app from Dock

There's a window-level .skip_taskbar() method, but as far as I can tell nothing for hiding the app itself from the Dock

probablykasper avatar Jun 24 '21 00:06 probablykasper

skip_taskbar should always be for window-level.

I am assuming you are on macOs and unfortunately it is not supported atm because on macOs it is app-level and we still haven't decided how to introduce this.

amrbashir avatar Jun 24 '21 07:06 amrbashir

I think we forgot to document that it doesn't work on macOs

amrbashir avatar Jun 24 '21 07:06 amrbashir

This could be accomplished with set_activation_policy

https://github.com/tauri-apps/tao/blob/dev/examples/system_tray_no_menu.rs#L36

But, tauri do not expose it yet.

lemarier avatar Jun 24 '21 09:06 lemarier

@amrbashir Yeah, I agree that skip_taskbar should only be window-level.

In Electron they just have dock.hide() and dock.show(), maybe Tauri could have set_dock_visibility(bool)

probablykasper avatar Jun 24 '21 12:06 probablykasper

Electron; https://www.electronjs.org/docs/api/dock

lemarier avatar Jun 24 '21 12:06 lemarier

I'm looking to make a simple systray-only app for OSX. This feature would be a big help.

@amrbashir how much work is it to add a set_dock_visibility(bool) like @probablykasper suggested?

wburningham avatar Jul 28 '22 14:07 wburningham

@wburningham it should be fairly simple but I don't know much about macOS development so I guess this issue is waiting for someone with macOS development background to make a PR.

amrbashir avatar Jul 28 '22 14:07 amrbashir