Skip to content

Add application tray functionality#857

Open
RxmTaco wants to merge 4 commits intocommetchat:mainfrom
RxmTaco:minimize-to-tray
Open

Add application tray functionality#857
RxmTaco wants to merge 4 commits intocommetchat:mainfrom
RxmTaco:minimize-to-tray

Conversation

@RxmTaco
Copy link
Copy Markdown

@RxmTaco RxmTaco commented Mar 19, 2026

This adds a new dependency tray_manager and adds basic tray icon functionality (open/close application) selectable from the tray icon menu. The Minimize on close setting's behavior has been changed to hide the application and retain the tray icon, instead of simply minimizing the application. With the previous implementation of minimize on close, there was no option left to exit the application, so this adds a way to exit the application from the tray icon menu without having to kill it with an external task manager. Process signal handlers for SIGINT and SIGTERM have been added, which fixes #842

@RxmTaco RxmTaco changed the title Added application tray functionality Add application tray functionality Mar 20, 2026
@SpookySkeletons
Copy link
Copy Markdown

Does this add a launch flag for background start of commet?
Does the tray icon indicate notifications?

@RxmTaco
Copy link
Copy Markdown
Author

RxmTaco commented Mar 24, 2026

The current window management implementation already has the option to pass a command line argument --minimize which remains fully functional. Exception being that instead of just minimizing the application, it now gets minimized to tray during launch.

I had however completely forgotten about notifications, so I have made a new commit which adds a red badge to the tray icon when there are notifications present.

Tray_Notification.mp4

This implementation renders a copy of the default application icon with the added badge overlaid on the image. This image then gets cached to the file cache so it is not re-created every time the icon needs to be updated.
I would like to get some feedback from someone who is more familiar with the caching system if this approach is reasonable and if the caching has been implemented in a desired way.

@RxmTaco
Copy link
Copy Markdown
Author

RxmTaco commented Mar 27, 2026

Additional linux build requirements:
https://github.com/leanflutter/tray_manager#linux-requirements

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.

"Minimize on close" prevents manual closing and system shutdown (Linux, KDE)

2 participants