Skip to content

wallpaper: list wallpapers through the background process - #4150

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:wallpaper-list
Nov 5, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:wallpaper-list

Conversation

@Conava

@Conava Conava commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description

Automatic cycling broke on folders with a " in the name and on file names with a newline, because the folder was listed with a shell command. The list now comes from the background process, so those work.

This is the first of a series of PRs for a wallpaper library: multiple wallpaper folders that can be managed and combined for slideshows, hiding wallpapers that don't fit a display, display groups, folders/collections and slideshows per display. All of those, and Super+Y showing what's available on a display, need one list of wallpapers across several folders so this PR moves the listing into the background process first, without adding any new settings yet.

A KDE wallpaper package (for example /usr/share/wallpapers/Next) is now also supported and counts as one wallpaper instead of each of its sizes and its dark variants being cycled separately. The size closest to the shape of the display is used. Automatic choosing and respect for light/dark images will be added later as well.

Behavior changes:

  • Folders starting with a dot are skipped when it would be included by the setting including subfolders
  • A folder stops at 50,000 wallpapers or after 30 seconds with a log entry
  • A symlink to a file that is already in the folder only counts once now
  • Next and Previous now also need the background process, the timer already did

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

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: https://github.com/duxlabs-dev/dux-docs

Cycling listed its folder with a find command in a shell string, which
broke on folder names with a quote and file names with a newline. Add a
wallpaper.list request that walks the folders in Go and returns a sorted
list, and have the cycling service use it instead of its find processes.

The walk follows symlinks with a loop guard, lists a symlinked file once,
skips dot directories and stops at 50,000 items or after 30 seconds. A
KDE wallpaper package counts as one wallpaper, and cycling uses the size
closest to the shape of the display.

Next and Previous now need the background process, like the schedule
already did.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature fix ui Quickshell UI under quickshell/ labels Nov 5, 2026
@bbedward

bbedward commented Nov 5, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: Go wallpaper.list handler and walker (symlink loops and dedupe, KDE package collapsing, cap/timeout truncation, UTF-8 filter, ctx plumbing in router), QML WallpaperCyclingService switch from find processes to IPC (response handling, revision guard, variant selection, index fallback when the current path is not listed, removed process/findPredicate references). Model: claude-opus-5-5.

@bbedward
bbedward merged commit 3d108ce into duxlabs-dev:master Nov 5, 2026
7 checks passed
dux-ci Bot pushed a commit that referenced this pull request Nov 5, 2026
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 fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants