Skip to content

Conversation

@PolisanTheEasyNick
Copy link
Contributor

@PolisanTheEasyNick PolisanTheEasyNick commented Apr 18, 2024

epic pr🚀 cooking explodin
Resolves #294, partially resolves #667

  • Show icons depending on current voice state
  • Auto change fill color with override function depending on white/black theme
  • MacOS devices support
  • Show notification badge at top of icon

Any ideas about improving PR structure are welcome ^^


Voice Detection Icons

image image image image


Notification Badge on top of Tray Icon

image

Special thanks to @MrGarlic1 and @Covkie

Also, on my repo, there is branch tray-icon-old where all changes with tray icons customizations, colors, and so on

@Korpyz
Copy link

Korpyz commented Apr 19, 2024

It's a great feature, but I wanted to say that maybe the colors could be different. I barely see the icon in gnome where the bar is completely black. If you could choose a palette that benefits everyone that would be great. It seems very hidden indeed. for me tray icons vesktop always seem of low quality when compared with other Apps. These two are the last ones that look really bad in gnome. I believe it's just a palette choice like the white of the other tray icons

image

image

the color palette doesn't have to be white, just some color that benefits from black.

image

@PolisanTheEasyNick
Copy link
Contributor Author

Thank you for feedback! I'm not using any black colors, I believe that it was just small border width. Also, I increased whole icon size. Can you please pull and retest?
What state is on your last screenshot? If it is muted or deafened that means that icons too small, and we need to redraw them completely, because I just took discord's original icons and changed colors to Vesktop ones. They are 24x24 pixels, so maybe they have not resized to proper size in Gnome system.

@Korpyz
Copy link

Korpyz commented Apr 19, 2024

Thank you for feedback! I'm not using any black colors, I believe that it was just small border width. Also, I increased whole icon size. Can you please pull and retest? What state is on your last screenshot? If it is muted or deafened that means that icons too small, and we need to redraw them completely, because I just took discord's original icons and changed colors to Vesktop ones. They are 24x24 pixels, so maybe they have not resized to proper size in Gnome system.

I can confirm that it looks much better! Well, maybe the edges of the circle could be a little smoother but I believe that the pixels are due to my monitor. That's great :) thanks for accepting the feedbeck.

image

@Covkie
Copy link
Collaborator

Covkie commented Apr 24, 2024

Might it be best to fold #261 into this PR?

@D3SOX
Copy link
Contributor

D3SOX commented Apr 24, 2024

Why is it pink. I think this should either copy stock Discord or make it customizable. I would prefer the latter then I could select my accent color.
Not sure if it's feasible when it must be a PNG

@PolisanTheEasyNick
Copy link
Contributor Author

PolisanTheEasyNick commented Apr 26, 2024

Added ability to change colors. For now, I want to find a way how to disable icon color chooser in settings when tray icon is disabled instead of hiding the whole setting and (maybe) add ability to propose to user his system accent color.
Edit: also I want to slightly refactor code for not reapplying same color to svg on each state change but instead apply them once on color change, somewhere store pngs of needed color and just use them. Done

@mrbigmouth502
Copy link

mrbigmouth502 commented Mar 14, 2025

The lack of a system tray notification dot in Vencord/Vesktop is the number one thing keeping me from switching to it from the stock Discord client. It's an extremely important feature for my workflow.

Hopefully the conflicts preventing it from being merged can be sorted out. 🙂

@Thespikedballofdoom
Copy link

The lack of a system tray notification dot in Vencord/Vesktop is the number one thing keeping me from switching to it from the stock Discord client. It's an extremely important feature for my workflow.

Hopefully the conflicts preventing it from being merged can be sorted out. 🙂

Same, really, really pining for this, it's the only thing I look for every update.

@Vendicated
Copy link
Member

Sorry for the long wait

I really love the addition of the tray icon modifiers, thank you!

Some feedback:

  1. Please resolve conflicts
  2. You seem to have added a native dbus library. Do we really need this? If yes, make sure that it is correctly bundled into the binary when packaging, not just when running dynamically from source. Also make sure this won't cause issues when running on non-linux, and make sure arm64 is correctly supported
  3. I'm not really a fan of the customisations being baked into this PR. I do plan to have one central UI for managing various images but that should be part of a separate change, but the way you implemented it here doesn't really match what I had envisioned. Please remove the image customisation logic & ui. That will drastially reduce the complexity of this change

In other words, do keep all the tray modifiers like showing voice status, notification dot etc, but remove the settings ui

@kerriganx
Copy link

It is possible to add ability to set custom icon for unread messages instead of red dot? Thanks

@PolisanTheEasyNick
Copy link
Contributor Author

Thank you for response!

You seem to have added a native dbus library. Do we really need this?

I'm using it for getting accent color from Linux system. The library was added because it may be used for some other features, like #686.
Personally, I think that feature "automatically pick accent color and propose it to user" is not very critical, because user can just pick color by himself, so I will remove library and accent color feature from this PR scope.

but remove the settings ui

Should I remain color picker settings?

@PolisanTheEasyNick PolisanTheEasyNick marked this pull request as draft June 28, 2025 09:48
@KarlOfDuty
Copy link

I do plan to have one central UI for managing various images but that should be part of a separate change

Is this planned soon? If its like a year away couldn't this gui be allowed to exist until then? It would be a shame to have these features ready to go but then get removed until really far into the future.

@PolisanTheEasyNick PolisanTheEasyNick marked this pull request as ready for review June 28, 2025 12:47

let lastIndex: null | number = -1;
let lastBadgeIndex: null | number = -1;
export var lastBadgeCount: number = -1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always use let or const, never var

}
});

nativeTheme.on("updated", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be here

and it also needs to unsubscribe if the mainWin is destroyed

Comment on lines +15 to +18
export async function setTrayIcon(iconName: string) {
if (!tray || tray.isDestroyed()) return;
const Icons = new Set(["speaking", "muted", "deafened", "idle", "main"]);
if (!Icons.has(iconName)) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export async function setTrayIcon(iconName: string) {
if (!tray || tray.isDestroyed()) return;
const Icons = new Set(["speaking", "muted", "deafened", "idle", "main"]);
if (!Icons.has(iconName)) return;
const IconNames = ["speaking", "muted", "deafened", "idle", "main"];
export type IconName = typeof Icons[number];
export async function setTrayIcon(iconName: IconName) {
if (!tray || tray.isDestroyed()) return;
if (!IconNames.includes(iconName)) return;

invoke<void>(IpcEvents.CLIPBOARD_COPY_IMAGE, imageBuffer, imageSrc)
},
tray: {
setIcon: (iconURI: string) => invoke<void>(IpcEvents.SET_TRAY_ICON, iconURI),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setIcon: (iconURI: string) => invoke<void>(IpcEvents.SET_TRAY_ICON, iconURI),
setIcon: (iconName: IconName) => invoke<void>(IpcEvents.SET_TRAY_ICON, iconURI),

import the IconName type from the file in main

tray: {
setIcon: (iconURI: string) => invoke<void>(IpcEvents.SET_TRAY_ICON, iconURI),
setCurrentVoiceIcon: (listener: (...args: any[]) => void) => {
ipcRenderer.on(IpcEvents.SET_CURRENT_TRAY_ICON, listener);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to use the renderer commands system i recently added instead of listening to an ipc message

defaultValue: true,
invisible: () => isMac,
disabled: () => Settings.store.tray === false
invisible: () => isMac || Settings.store.tray === false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why invisible? it's better to only disable it so the user knows this exists

defaultValue: false
},
defaultValue: false,
invisible: () => Settings.store.tray === false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
invisible: () => Settings.store.tray === false
disabled: () => Settings.store.tray === false

@fragtion
Copy link

fragtion commented Jul 23, 2025

  1. I'm not really a fan of the customisations being baked into this PR. I do plan to have one central UI for managing various images but that should be part of a separate change, but the way you implemented it here doesn't really match what I had envisioned. Please remove the image customisation logic & ui. That will drastially reduce the complexity of this change

In other words, do keep all the tray modifiers like showing voice status, notification dot etc, but remove the settings ui

How should the icons now be modified now that the UI is removed? The default accent color is not striking/noticeable enough for me and I would like to be able to change it like we could earlier in this PR, but there seems to be no obvious way of doing that anymore...? Is this just a temporary regress?

@mrbigmouth502
Copy link

This branch is out-of-date with the base branch

Changes can be cleanly merged.

Hmm...

@Vendicated
Copy link
Member

I just added tray customisation via #1179 so if you rebase on that, you can add customisation back!

Getting the system accent colour will be made possible via #1180 so then we can just use the user's system accent colour for the badge modifier colour

@mrbigmouth502
Copy link

mrbigmouth502 commented Dec 21, 2025

I just wanna say thanks to whoever added tray notification badges recently. It's allowed me to finally switch over from the stock Discord client. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User customizable assets [Feature Request] Restore Discord "Audio Detected" tray icon?