fix(trayicon): wait for system tray availability on startup#116
Merged
ErikBjare merged 2 commits intoActivityWatch:masterfrom Feb 27, 2026
Merged
Conversation
On some desktop environments (e.g. KDE Plasma), autostart programs launch before the system tray/panel is loaded. aw-qt would immediately exit with an error in this case. Now polls for up to 30 seconds with Qt event processing, giving the desktop environment time to initialize its system tray. Falls back to the original error if the tray never becomes available. Fixes ActivityWatch#97
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to f071fe0 in 7 seconds. Click for details.
- Reviewed
47lines of code in1files - Skipped
0files when reviewing. - Skipped posting
0draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
Workflow ID: wflow_TUbKdbfrtL4ImxJq
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Greptile SummaryReplaces immediate failure when system tray is unavailable with a 30-second polling mechanism. The implementation calls Key changes:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: f071fe0 |
ErikBjare
reviewed
Feb 27, 2026
aw_qt/trayicon.py
Outdated
| ) | ||
| sys.exit(1) | ||
| logger.info("System tray not yet available, waiting up to 30 s...") | ||
| for i in range(30): |
Member
There was a problem hiding this comment.
30s seems like a lot? 10s should be more than enough
10 seconds is sufficient for KDE Plasma to load the system tray. Feedback from @ErikBjare.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app.processEvents()during the wait so Qt can detect when the tray becomes availableTest plan
Fixes #97
Important
Poll for system tray availability for up to 30 seconds on startup in
run()intrayicon.py, addressing KDE Plasma startup issues.run()intrayicon.py, poll for system tray availability for up to 30 seconds on startup.app.processEvents()during the wait to detect tray availability changes.This description was created by
for f071fe0. You can customize this summary. It will automatically update as commits are pushed.