Repository navigation
wallpaper: add wallpaper folders - #4155
Conversation
Wallpapers could only come from one folder at a time. Settings now has a Wallpapers page to list several folders, each of which can be hidden and can include its subfolders. Super+Y and the desktop strip show all visible folders once any are added. The folder button in Super+Y opens a menu where folders can be ticked, and the selection is saved. Next, Previous and automatic cycling stay inside it while the current wallpaper is in it. wallpaper.list now reports each file's folder, size and modified time, so all four sorts work across folders. Two new requests suggest standard wallpaper folders and catch a folder that is already listed under another path, so the API version goes to 41. The shell keeps using a single folder as before when no folders are added or the background process is older or missing. The four duplicated pick blocks move into applyWallpaperPick and the Dash thumbnail becomes a shared cell for the new folder page.
|
/claude review |
Claude reviewNo issues found. |
There was a problem hiding this comment.
Nice work on this! A few small things before we merge:
- i18n: all good here. The second
I18n.tr()arg is just a translator comment, so these already reuse the existing catalog terms. No change needed. - Hardcoded values:
thumbColumns: 5inWallpaperFolderTab.qmlandmaxPathLength: 48inWallpaperFolderMenu.qml. Could these come fromDashMetrics/Theme instead? - Thumbnail widget: Settings already has
SettingsWallpaperThumb, so the folder page shouldn't bring in a second thumbnail from Dash. Please extendSettingsWallpaperThumbinstead (something like a lightweight grid mode usingCachingImagewithmaxCacheSize) and use that inWallpaperFolderTab, rather than importingWallpaperThumbCell/DashMetricsinto Settings. Keeping theWallpaperThumbCellextraction for the Dash itself is fine. folderAddIPC: it returnsSUCCESSbefore thewallpaper.folderListedcheck comes back, so adding a folder that's already listed through a symlink tells the CLI it worked and only shows a toast. Could it return something like "adding…", or say the result shows up async?- Folder ownership: Go decides which folder owns a file after resolving symlinks, but
ownerFolder()in QML compares the path text. Overlapping folders reached through a symlink could make cycling and the grid disagree. A short comment or test covering that case would be enough.
In the docs we'll Just make sure the new wallpaper folder* IPC calls go into keybinds-ipc.mdx.
Settings no longer borrows the Dash thumbnail: the tile and its focus ring move to qs.Widgets and both grids use them. The Dash folder menu is built on CcMenu, which gains separators, items that keep the menu open and key forwarding for compositor grabs. Folder ownership is decided in one place. The background process gives a file to the added folder whose real path holds it, so a folder whose files another folder reaches through a symlink no longer shows up empty, and cycling asks it through wallpaper.folderOf instead of comparing path text. The folder IPC calls reject relative paths and folderAdd says the folder is being added rather than added. The folders page tells an outdated background process apart from a missing one. The thumbnail column count and folder name length come from metrics.
Claude reviewNo issues found. |
|
Thanks for the review! The requested changes are in. I did go a different route for the thubnails: instead of a grid mode on For the folder ownership the shell now asks the background process which folder a wallpaper belongs to, so cycling and the grid use the same rule. While looking into it I also found a bug where a folder showed up empty when another added folder reached its files through a symlink, that's fixed too. Other changes I found on the way:
Docs PR for the IPC calls: duxlabs-dev/dux-docs#207 |
|
Good stuff, thanks Canava! |
Description
Second PR of the wallpaper library arc.
Adds a Wallpapers page in Settings (under Wallpaper & colors) to list several wallpaper folders. Each folder can be hidden, can include its subfolders and has its own page with its wallpapers. The Add button also suggests the standard wallpaper folders that exist on the system.
Once folders are added, Super+Y and the desktop right-click strip show the wallpapers of all of them. The folder button in Super+Y now opens a menu to tick one or more folders. The selection is saved, and Next, Previous and automatic cycling stay inside the selected folders while the current wallpaper is in one of them. A wallpaper from somewhere else still cycles through its own folder like before.
Without any folders added, only the first two behavior changes below apply.
dms ipc call wallpapergetsfolders,folderAdd,folderRemove,folderHideandfolderShow.Behavior changes:
The Automatic cycling page stays untouched here, it gets replaced by the named slideshows later in the series. The same goes for the docs: there will be one docs PR with the last PR of the series.
Type of change
Related issues
Screenshots / video
How to add the systems default wallpaper folders easily:

Grayed out because hidden:

Multiple folders added:

Picker allows All or each added, non-hidden folder:

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 warnings