|
The wallpaper tab showed every image under ~/Pictures/wallpapers in one
grid. It now groups them by top-level folder, each behind a header that
opens and closes it, and adds the distribution's /usr/share/wallpapers:
its loose images as "system", its Plasma packages as "Plasma". A package
carries one picture at several resolutions under contents/images/, some
with a dark version under contents/images_dark/, so it shows once, the
dark version where there is one and the largest of those, labelled with
the package name rather than "5120x2880.png". Groups are keyed apart from
their names, so a local folder called "system" does not share open state
with the system group. Open state lives in the Wallpapers singleton,
because the panel is destroyed on close.
The list is one flat ListView of rows, a header or a row of thumbnails,
so only rows in view (plus cacheBuffer) are instantiated and decode. A
first version made each folder one delegate, which loaded every image of
a folder as soon as it opened; the system group alone is 727. The rows
live in a ListModel and a toggle inserts or removes only that folder's
rows: assigning a fresh JS array instead resets the view, which loses the
scroll position and re-decodes everything visible. cacheBuffer is clamped
at 0 because the column's width reads negative before layout and the
ListView warns on each negative value.
The scan's find calls go through a small shell function rather than eval.
Each thumbnail's 2px border tells how it will look on the targeted
screen. `file -N -0` reads every image's size from its header after each
scan, ~0.6s for 1161; the NUL keeps names containing ": " intact, and the
size is the last WxH in the description because a JPEG's "density 72x72"
comes first. wallp runs swaybg -m fill, which scales to cover, so the
measure is the enlargement factor: <=1 green, <=1.33 yellow, else red, in
the udt palette colours. A note under the mock screens, in that colour,
gives the size, the factor and why it will look soft or pixelated, for
the hovered image or else the staged one. The staged image keeps its
accent border. Screen sizes are fixed, as the mock's already were.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
One drawer for how the desktop looks, on SUPER+Return, replacing the
qarma file dialog that key used to open. wallp is untouched and still
does the work: the panel calls it with H= and V= and it still runs from
a terminal.
Clicking a thumbnail stages it rather than setting it, so both screens
can be composed before anything changes and Apply is a single wallp
call. The mock screens show the result: the staged pick where there is
one, what is set where there is not, and the hovered thumbnail on the
targeted screen. They are drawn at the real proportions from hyprctl
monitors, DP-3 upright because it has transform=1, centred against each
other as Hyprland has them.
The scheme tab reads the palette pair unified-desktop-theme keeps for
each scheme, so the swatches are that scheme's real colours and the list
needs no edit when a scheme is added. Applying writes roles.conf and
runs install.sh, and reloads nothing, because install.sh reloads
nothing: the panel says what is still showing the old scheme rather than
pretending the switch is done.
Two QML traps are documented in AGENTS.md because neither announces
itself: there is no String.matchAll, which threw inside a try and left
every swatch empty, and assigning running = true to an already-running
Process does nothing, which stopped the scheme loader after the first
file.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7
|