-
-
Notifications
You must be signed in to change notification settings - Fork 351
feat: Tray icon voice detection, customization and notification badge #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
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 the color palette doesn't have to be white, just some color that benefits from black. |
|
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? |
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. |
This reverts commit 3ccb0c4.
35b8db0 to
5b3c9b5
Compare
|
Might it be best to fold #261 into this PR? |
|
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. |
|
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. |
|
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. |
|
Sorry for the long wait I really love the addition of the tray icon modifiers, thank you! Some feedback:
In other words, do keep all the tray modifiers like showing voice status, notification dot etc, but remove the settings ui |
|
It is possible to add ability to set custom icon for unread messages instead of red dot? Thanks |
|
Thank you for response!
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.
Should I remain color picker settings? |
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. |
|
|
||
| let lastIndex: null | number = -1; | ||
| let lastBadgeIndex: null | number = -1; | ||
| export var lastBadgeCount: number = -1; |
There was a problem hiding this comment.
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", () => { |
There was a problem hiding this comment.
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
| 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| invisible: () => Settings.store.tray === false | |
| disabled: () => Settings.store.tray === false |
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? |
Hmm... |
|
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. 🙂 |




epic pr🚀 cooking explodin
Resolves #294, partially resolves #667
Any ideas about improving PR structure are welcome ^^
Voice Detection Icons
Notification Badge on top of Tray Icon
Special thanks to @MrGarlic1 and @Covkie
Also, on my repo, there is branch
tray-icon-oldwhere all changes with tray icons customizations, colors, and so on