Repository navigation
Conversation
Member
|
/claude review |
Contributor
Claude reviewLooks good overall; one memory issue to fix.
|
| property string pendingAppId: "" | ||
| property var pendingToplevel: null | ||
|
|
||
| FileBrowserModal { |
Contributor
There was a problem hiding this comment.
FileBrowserModal is a FloatingWindow. Every DockAppButton reads DockIconService.iconFor, so this singleton gets built as soon as the dock loads. That means a hidden window object (plus its WindowBlur) stays in memory for the whole session, even though the picker is used rarely. Other long-lived hosts, like SettingsModal and NetworkVpnTab, wrap the browser in a Loader/LazyLoader with active: false. Do the same here: set active = true in chooseImage() and call open() on the loaded item. Optionally set it back to inactive after accepted/rejected.
This branch has not been deployed
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.
Description
When I have many terminals open they all look the same in the dock, see the screenshot below. This adds "Change Icon" to the right click menu of a single window. It opens the file browser and the picked image (png, svg, jpg, webp) replaces the dock icon of that window until the window closes.
"Remember Icon" saves the icon for that app and window title, so a new window with the same title gets it back. Leading spinner and status characters in the title are ignored, Claude Code and some other tools prefix titles with those. "Reset Icon" goes back to the app's own icon.
Remembered icons are stored in session.json as
dockIconRules.Type of change
Screenshot
No icons set yet, the new "Change Icon" item in the menu:
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warningsAdded
quickshell/tests/dock-icon-rules.test.mjsfor the title matching. Tested on driftwm on top of v2.1.0, which is my installed version. The branch itself is on current master.The code was written with Claude Code, tested by me.