Skip to content

wallpaper: add wallpaper folders - #4155

Merged
purian23 merged 2 commits into
duxlabs-dev:masterfrom
Conava:wallpaper-folders
Nov 10, 2026
Merged

purian23 merged 2 commits into
duxlabs-dev:masterfrom
Conava:wallpaper-folders

Conversation

@Conava

@Conava Conava commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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 wallpaper gets folders, folderAdd, folderRemove, folderHide and folderShow.

Behavior changes:

  • The folder button in Super+Y opens a menu with Browse and Settings instead of going straight to the file picker
  • The "Choose wallpaper folder" button in Super+Y's empty state now opens the new page
  • With folders added, Next and Previous go through the selected folders when the current wallpaper is in one of them, instead of only its own folder

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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

How to add the systems default wallpaper folders easily:
screenshot_2026-11-05_22-41-45

Grayed out because hidden:
screenshot_2026-11-05_22-42-09

Multiple folders added:
screenshot_2026-11-05_22-42-23

Picker allows All or each added, non-hidden folder:
screenshot_2026-11-05_22-42-41

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: docs(dms): document the wallpaper folder IPC calls dux-docs#207

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.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/ labels Nov 5, 2026
@purian23

purian23 commented Nov 7, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: Go listing ownership/ordering, file info, SuggestFolders/FolderListed and the new socket methods vs the QML callers (API 41 gate); WallpaperLibraryService ref holding, request invalidation and revision flow; cycling pool and selection logic; Super+Y and desktop strip library mode; the two new Settings pages, the folder menu and the IPC handlers; widget APIs, deprecated shims, I18n and session spec coercion. Model: claude-opus-5-5.

@purian23 purian23 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: 5 in WallpaperFolderTab.qml and maxPathLength: 48 in WallpaperFolderMenu.qml. Could these come from DashMetrics/Theme instead?
  • Thumbnail widget: Settings already has SettingsWallpaperThumb, so the folder page shouldn't bring in a second thumbnail from Dash. Please extend SettingsWallpaperThumb instead (something like a lightweight grid mode using CachingImage with maxCacheSize) and use that in WallpaperFolderTab, rather than importing WallpaperThumbCell/DashMetrics into Settings. Keeping the WallpaperThumbCell extraction for the Dash itself is fine.
  • folderAdd IPC: it returns SUCCESS before the wallpaper.folderListed check 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.
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: the review-feedback commit, re-checked against the full PR: Go folder ownership (folderSet owner/dirOwner, the package images-dir check, the cached owners) and how wallpaper.folderOf matches the listing; the absolute-path guards and the async message on the folder IPC calls; cycling through folderOf with request-revision invalidation; CcMenu separators, keepOpen and key forwarding against the DContextMenu API; the WallpaperThumbTile/Highlight moved into qs.Widgets and used by both grids; the outdated-server note on the folders page; the metrics, deprecated shims and I18n. Model: claude-opus-5-5.

@Conava

Conava commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! The requested changes are in.

I did go a different route for the thubnails: instead of a grid mode on SettingsWallpaperThumb I moved the Dash tile and its focus ring into qs.Widgets, so the Dash and the Settings folder page share one tile now. A grid mode would have been a second copy of the same code inside SettingsWallpaperThumb, so I think this is the best approach to properly share the code now.

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:

  • The Dash folder menu now uses CcMenu like the other Dash menus
  • The folder IPC calls reject relative paths
  • The folders page says when the DMS server is outdated instead of saying it's not available

Docs PR for the IPC calls: duxlabs-dev/dux-docs#207

@Conava
Conava requested a review from purian23 November 9, 2026 23:05
@purian23
purian23 merged commit 2b14b9d into duxlabs-dev:master Nov 10, 2026
9 checks passed
@purian23

Copy link
Copy Markdown
Member

Good stuff, thanks Canava!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants