Skip to content

wallpaper: hide wallpapers that don't fit the display - #4288

Merged
bbedward merged 5 commits into
duxlabs-dev:masterfrom
Conava:wallpaper-fit-filter
Nov 24, 2026
Merged

bbedward merged 5 commits into
duxlabs-dev:masterfrom
Conava:wallpaper-fit-filter

Conversation

@Conava

@Conava Conava commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

Builds on the folders PR in #4155, in preparation for display groups and per-display slideshows.

This adds a "Hide wallpapers that don't fit the display" toggle to Wallpaper & colors. With it on, Super+Y, the desktop right-click menu, Next/Previous and automatic cycling only offer wallpapers that fit the display they are meant for. The rule is fixed for now: the aspect ratio has to be within 1.5x of the display's and the image can't need more than 1.5x upscaling. That leaves some room, and the fill mode decides how those slightly off images are shown.
Respects the individual display if they show separate wallpapers, with one shared wallpaper the display with the highest resolution decides.

The folder page in Settings still shows everything, with the wallpapers that don't fit dimmed and marked with the hidden icon and their size. You can still pick them from there if wanted.

Without any wallpaper folder the toggle is hidden and nothing is filtered, since the image sizes come with the folder list. They are only read while the toggle is on. SVGs always show up, and so do video, AVIF, HEIF, JXL and EXR files when ffprobe isn't installed, since their size is unknown then.

Also, picking a KDE wallpaper package in Super+Y or the desktop menu now uses the size that matches the display's shape, the same way automatic cycling already did, instead of always the largest one.

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

screenshot_2026-11-15_22-07-31 screenshot_2026-11-15_22-08-00

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

A new toggle on Wallpaper & colors, shown once a wallpaper folder is
added, limits Super+Y, the desktop menu strip, Next/Previous and
automatic cycling to wallpapers that fit the display they are for: an
aspect ratio within 1.5x of the display's and at most 1.5x upscaling,
in physical pixels. In per-display mode each display is judged on its
own; with one shared wallpaper the display with the most pixels
decides. SVGs and files of unknown size always pass.

wallpaper.list takes a dimensions flag and only then reads sizes:
image headers through image.DecodeConfig, and ffprobe (when installed)
for video, AVIF, HEIF, JXL and EXR, with the canvas of tiled HEIF/AVIF
and display rotation taken into account. Reads are bounded (4 at once,
5 s and 64 KB per ffprobe run) and cached on path, size and mtime.
Without the flag the response is unchanged. API version 43.

Picking a KDE wallpaper package in Super+Y or the desktop menu now
applies its size closest to the display's shape, as cycling already
did.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/ labels Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

Looks good, with one compatibility issue for older ffprobe.

  • On ffprobe older than 7.0, the stream_group_* entries make every probe fail, so videos, AVIF and HEIF are never measured or filtered: core/internal/server/wallpaper/dimensions.go:137
    Docs pending: wallpaperHideMismatched setting, dimensions param of wallpaper.list
    Checked: Go size reading, caching, concurrency and ffprobe handling; the fit and variant logic in QML (WallpaperMatch.js, WallpaperLibraryService, cycling, Super+Y, desktop menu, folder tab); refresh and revision triggers; Theme tokens; deprecated shims; I18n; the search index condition. Model: claude-opus-5-5.

ffprobe fails the whole call on an unknown -show_entries section.
stream_group_component came with FFmpeg 7.0 and stream_group_side_data
only with 9.0, so on older versions every probe exited 1 and videos,
AVIF and HEIF were cached as unknown size even with ffprobe installed.

Check `ffprobe -sections` once per binary and only request the group
entries it lists. A failed check leaves the size unknown without
caching it.

Claude-Session: https://claude.ai/code/session_01DQu2E3ZSRt9kas4CzM8kfP
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The new commit fixes the earlier ffprobe < 7.0 finding: it checks ffprobe -sections once per binary and only asks for the stream group entries that version lists.
Docs pending: wallpaperHideMismatched setting, dimensions param of wallpaper.list
Checked: ffprobe section detection and its caching, failure and timeout paths, the concurrent first probe, and the updated fake ffprobe tests; also re-checked Go size reading and caching, the fit and variant logic in QML (WallpaperMatch.js, WallpaperLibraryService, cycling, Super+Y, desktop menu, folder tab), refresh and revision triggers, Theme tokens, deprecated shims and I18n. Model: claude-opus-5-5.

# Conflicts:
#	quickshell/Common/settings/ConfigProfiles.js
#	quickshell/Widgets/WallpaperThumbTile.qml
Master moved the profiles card into a SettingsDeferred, and the merge left the toggle inside it as a second child.
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found. The new commits merge master, bump the API version to 44, and move the fit toggle back into the Wallpaper card after the merge left it in the profiles card.
Docs pending: wallpaperHideMismatched setting, dimensions param of wallpaper.list
Checked: the merge with #4357 (a new holder clearing requestKey works with the requestDimensions reuse check), where the toggle sits now and its search index entry and condition, the API version bump against requiredApiVersion (older servers ignore dimensions, so sizes are unknown and everything passes), the index mapping in the folder tab, deprecated shims in WallpaperThumbTile, Theme tokens and I18n. Earlier runs covered the Go size reading, the ffprobe section detection and the fit and variant logic. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 9e4401d into duxlabs-dev:master Nov 24, 2026
7 checks passed
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