diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-02 22:41:25 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-02 22:41:25 +1100 |
| commit | 7b6a109ad3c306b7122d27cabe7e2a68c166ad55 (patch) | |
| tree | ed2689a876b2cd02f057dcd59da4b50754ee0579 /src/services | |
| parent | feat: define bar layout via config (diff) | |
| download | caelestia-shell-7b6a109ad3c306b7122d27cabe7e2a68c166ad55.tar.gz caelestia-shell-7b6a109ad3c306b7122d27cabe7e2a68c166ad55.tar.bz2 caelestia-shell-7b6a109ad3c306b7122d27cabe7e2a68c166ad55.zip | |
launcher: sort wallpapers and schemes
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/wallpapers.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/services/wallpapers.ts b/src/services/wallpapers.ts index f0a68af..f1f13a5 100644 --- a/src/services/wallpapers.ts +++ b/src/services/wallpapers.ts @@ -59,13 +59,15 @@ export default class Wallpapers extends GObject.Object { const list = (await execAsync(["fish", "-c", `identify -ping -format '%i\n' ${files} ; true`])).split("\n"); this.#list = await Promise.all(list.map(async p => ({ path: p, thumbnail: await Thumbnailer.thumbnail(p) }))); + this.#list.sort((a, b) => a.path.localeCompare(b.path)); this.notify("list"); const categories = await Promise.all(successes.map(r => this.#listDir(r.path, "d"))); this.#categories = categories .flatMap(c => c.split("\n")) .map(c => ({ path: c, wallpapers: this.#list.filter(w => w.path.startsWith(c)) })) - .filter(c => c.wallpapers.length > 0); + .filter(c => c.wallpapers.length > 0) + .sort((a, b) => a.path.localeCompare(b.path)); this.notify("categories"); } |