element-hq / element-desktop

A glossy Matrix collaboration client for desktop.
https://element.io
GNU Affero General Public License v3.0
1.13k stars 258 forks source link

Add an icon in macos topbar #1165

Open fulljackz opened 1 year ago

fulljackz commented 1 year ago

Your use case

What would you like to do?

It would be very helpfull to have an icon in the macos top bar with the same behavior as linux client. On linux (gnome), the element green icon turns on red when you receive a message and voila.

On macos, there is a permanent notification banner in the top right of the screen which appears and disappear for each messages.

Why would you like to do it?

It would avoid permanent banner notifications.

How would you like to achieve it?

Have you considered any alternatives?

Nope. I searched about this kind of issue here and on the web but I did not find any tips or solution. Maybe that this subject has already been discussed and I did not saw it. If yes, dont hesitate to delete this issue (after few details if it can be done or not :))

Additional context

Running macos 13.5.

yawks commented 7 months ago

It is explicitly excluded in the code, in the tray.ts file: image

However, the electron documentation mentions Mac for tray icons: https://www.electronjs.org/docs/latest/api/tray Was it a delibarate choice?

t3chguy commented 7 months ago

Yes it is intentionally not used on macOS in favour of the Dock, as that supports the notification badge etc, unlike tray on macOS.

yawks commented 7 months ago

Ok, got it, and using a tool like https://github.com/xiaogdgenuine/Doll could be used to have it in the top bar. However, I do not have any badge on the element icon in the Dock and I did not find any information about it?

t3chguy commented 7 months ago

@yawks check Notification settings both within Element & macOS

image
yawks commented 7 months ago

You're right, it was just a setting in macos to have badges... 🤦 I can now have the Element icon in the topbar + count of unread messages using doll:

image

I am not sure this ticket should remain open.

codedreality commented 5 months ago

Would it be a possibility to add the functionality from electron to show a tray icon on macOS, maybe with a setting to enable it for people who would like to have it in top bar and which hide their Dock most of the time.

Think it would be sufficient to change the icon of the tray item to one for example with a red dot if there a new messages. No need to generate different numbers etc.

t3chguy commented 5 months ago

Technically possible yes, though the Product & Design teams are averse to adding endless settings to the app in the interest of simplicity so are unlikely to sign off on this and it would likely better be in a fork.