aboutsummaryrefslogtreecommitdiffstats
path: root/appearance/Icons.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 13:15:46 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 13:15:46 +0200
commit0c0ea6b422907df12deb48a1ea3d332d072b9f69 (patch)
treecf674cd0972208492d544e34f273f6b46cc20e9d /appearance/Icons.qml
parent222875656922ab5826b3d7c546bb3ab0a4e04e17 (diff)
downloadquickshell-0c0ea6b422907df12deb48a1ea3d332d072b9f69.tar.gz
quickshell-0c0ea6b422907df12deb48a1ea3d332d072b9f69.zip
fix(appearance): final review fixes for the Sunset, Idle and Icons tabs
xcur2png wrote its config file into the qs CWD, which is the repo root, so hovering a legacy Xcursor theme left a stray left_ptr.conf in the tree. Point -c at the per-theme cache dir instead. Hyprsunset.save() could run before refresh()'s two cat processes landed and write a header-only hyprsunset.conf, blanking the location. Guard on the same confLoaded/appLoaded flags Hypridle already uses. The idle save had no acknowledgement, which the spec requires. Add a notice after the restart and show it in the tab, and switch Hypridle's save guard to a loaded flag so a config whose first block is a listener is not mistaken for an unloaded one. classify() used else if, so a directory carrying both index.theme and cursors/ (Adwaita) was listed as a cursor theme only and never reached the icon picker. Make the two tests independent; selftest gains the dual-purpose case.
Diffstat (limited to 'appearance/Icons.qml')
-rw-r--r--appearance/Icons.qml12
1 files changed, 7 insertions, 5 deletions
diff --git a/appearance/Icons.qml b/appearance/Icons.qml
index 4c97a75..690fff2 100644
--- a/appearance/Icons.qml
+++ b/appearance/Icons.qml
@@ -54,7 +54,7 @@ for name in sys.argv[1:]:
const icons = [], cursors = [];
for (const e of entries) {
if (e.cursors || e.manifest) cursors.push(e.name);
- else if (e.index && /Directories=\S/.test(e.index)) icons.push(e.name);
+ if (e.index && /Directories=\S/.test(e.index)) icons.push(e.name);
}
const uniq = a => a.filter((v, i) => a.indexOf(v) === i).sort();
return { icons: uniq(icons), cursors: uniq(cursors) };
@@ -66,12 +66,14 @@ for name in sys.argv[1:]:
{ name: "hypr_bibata-modern-amber", index: "", cursors: false, manifest: true },
{ name: "default", index: "Inherits=Bibata-Modern-Amber\n", cursors: false, manifest: false },
{ name: "breeze_cursors", index: "", cursors: true, manifest: false },
+ { name: "Adwaita", index: "Directories=16x16/apps\n", cursors: true, manifest: false },
];
const r = root.classify(entries);
- if (r.icons.length !== 1 || r.icons[0] !== "Material-Black-Plum-Suru")
+ if (r.icons.length !== 2 || r.icons.indexOf("Adwaita") < 0 ||
+ r.icons.indexOf("Material-Black-Plum-Suru") < 0)
return `SELFTEST Icons FAIL: icons ${JSON.stringify(r.icons)}`;
- if (r.cursors.length !== 2 || r.cursors.indexOf("hypr_bibata-modern-amber") < 0 ||
- r.cursors.indexOf("breeze_cursors") < 0)
+ if (r.cursors.length !== 3 || r.cursors.indexOf("hypr_bibata-modern-amber") < 0 ||
+ r.cursors.indexOf("breeze_cursors") < 0 || r.cursors.indexOf("Adwaita") < 0)
return `SELFTEST Icons FAIL: cursors ${JSON.stringify(r.cursors)}`;
return "SELFTEST Icons PASS";
}
@@ -178,7 +180,7 @@ for name in sys.argv[1:]:
`[ -s ${out} ] || exit 1;; ` +
`*.svg) cp "$c" ${out};; ` +
`*) rm -rf ${dir}/raw-${name}; mkdir -p ${dir}/raw-${name}; ` +
- `xcur2png -d ${dir}/raw-${name} "$c" >/dev/null 2>&1; ` +
+ `xcur2png -d ${dir}/raw-${name} -c ${dir}/raw-${name}/out.conf "$c" >/dev/null 2>&1; ` +
`cp "$(ls ${dir}/raw-${name}/$(basename "$c")_*.png | tail -1)" ${out};; esac`]
curPreviewProc.running = false;
curPreviewProc.running = true;