overlayeddev / overlayed

A modern, open-source, and free voice chat overlay for Discord that supports Mac, Linux, and Windows
https://overlayed.dev
GNU Affero General Public License v3.0
355 stars 27 forks source link

Hide Taskbar icon if overlay is pinned #199

Open samfry13 opened 3 months ago

samfry13 commented 3 months ago

Is your feature request related to a problem? Please describe. On Windows, the overlay window stays present on the taskbar even when the overlay is pinned (i.e. hidden) and the user is not in a call

Describe the solution you'd like If the user has the overlay pinned, don't show a window on the taskbar

Describe alternatives you've considered N/A

Additional context Screenshot
image

Tauri has a setting for skipping the taskbar. This could potentially be set/unset when the user pins/unpins the overlay window respectively

Hacksore commented 3 months ago

Yeah I'll think we can support this but as an opt-in. We'd want something like this for the config:

@ahkohd can we change the activation policy dynamically at runtime so that when pinning we make it hidden from the dock and unpinning it goes back to normal?

samfry13 commented 3 months ago

I believe set_skip_taskbar works for both windows and linux. It's just MacOS that isn't supported from that method.

ahkohd commented 3 months ago

Yeah I'll think we can support this but as an opt-in. We'd want something like this for the config:

* `windowsHideFromTaskbarWhenPinned` (for windows we can call [set_skip_taskbar](https://docs.rs/tauri/latest/tauri/window/struct.Window.html#method.set_skip_taskbar)

* `macHideFromDockWhenPinned` (for macOS we can call a custom impl to chage `set_activation_policy` to `Accessory`)

* Linux (no idea 😂)

@ahkohd can we change the activation policy dynamically at runtime so that when pinning we make it hidden from the dock and unpinning it goes back to normal?

The activation policy is called in the Tauri setup function, which is already running at runtime. This should make it possible.