diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-16 11:02:00 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-16 11:02:00 +0100 |
| commit | acc837d722d6905b47f0b673b84b02345867fb6e (patch) | |
| tree | 21767eeb3f63a695cb0570ec23c1ddac31129b14 /desktop/modules/appearance/README.md | |
| parent | 42788ad568e5b600c2dfd11feb2bf7942cf6d584 (diff) | |
| download | quickshell-acc837d722d6905b47f0b673b84b02345867fb6e.tar.gz quickshell-acc837d722d6905b47f0b673b84b02345867fb6e.zip | |
feat(wallpapers): filter by colour, one folder open at a time
A row of colour circles under the mock screens filters the thumbnails
to the wallpapers a colour dominates; a second click clears it, and
folders left empty drop out. magick quantizes a 64 px copy of each
image to six colours, in parallel, and WallColors.js files every colour
under a hue bucket, or dark or light when it has little saturation.
Each image matches one bucket only: the largest colour bucket when it
covers a quarter of the image, else the larger of dark and light.
Matching any bucket over a fifth mixed a red sunset in with blue skies.
Saturation is HSV's, since HSL reads a pale lavender as strongly
coloured. The raw colours are cached by path in
~/.cache/keystone/wallcolors.tsv, so only new files are analysed; the
first run over 843 images took about 20 seconds.
The circles use fixed colours rather than the theme's: they name hue
buckets that do not move with the scheme, and the live scheme reused
one colour under several names, drawing three pairs of twin circles.
Opening a folder now folds whichever was open. A filter that empties
the open folder folds it for real and opens the first folder with
matches; merely hidden, it came back beside the next one opened once
the filter was cleared.
Run: node desktop/modules/appearance/test_wallcolors.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/appearance/README.md')
| -rw-r--r-- | desktop/modules/appearance/README.md | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/desktop/modules/appearance/README.md b/desktop/modules/appearance/README.md index 2c9a6ad..f6f0356 100644 --- a/desktop/modules/appearance/README.md +++ b/desktop/modules/appearance/README.md @@ -84,7 +84,10 @@ where there is not, and the hovered thumbnail on the targeted screen while the pointer is over it. The thumbnails are grouped by folder, each a header that opens and closes -it, closed to begin with and remembered while the shell runs. The local +it, closed to begin with and remembered while the shell runs; opening one +folds whichever was open, so only one is open at a time. A colour filter +that leaves the open folder empty folds it and opens the first folder with +matches instead. The local groups are the top-level folders of `~/Pictures/wallpapers`, with the images loose in it as a group of its own; after them come the distribution's, `/usr/share/wallpapers`, as `system` for its loose images and `Plasma` for @@ -105,6 +108,20 @@ how far it enlarges: not at all is green, up to 1.33x yellow, past that red. Under the mock screens a note in the same colour says why, for the hovered image or else the staged one. The staged image keeps the accent border. +The row of colour circles under the mock screens filters the list: a click +shows only the wallpapers that carry that colour, folders left empty drop +out, and a second click shows them all again. Each image is quantized to six +colours by `magick` on a 64 px copy, run in parallel, and each colour lands +in a hue bucket, or dark or light when it has little saturation +(`WallColors.js`, tested by `node test_wallcolors.js`). Each image is filed +under one bucket, its dominant one: the largest colour bucket when it covers a +quarter of the image, else the larger of dark and light. A first version +matched any bucket over a fifth, and a blue sky with a red sunset showed +under both. The raw colours are cached by path in +`~/.cache/keystone/wallcolors.tsv`, so only new files are analysed: the first +run over 843 images filled it in about 20 seconds. Saturation is HSV's, not +HSL's: HSL reads a pale lavender like `#cad3f5` as strongly coloured. + "Open wallhaven-dl" under the mock screens launches the wallhaven-dl app, which searches wallhaven.cc and finds larger copies of low-res wallpapers, and closes the settings window, as a successful Apply does, so the desk |
