fix swaync notification parsing, use alt field

This commit is contained in:
Damocles 2026-04-12 17:19:38 +02:00
parent 43c2541ccd
commit 784ded0a32

View file

@ -27,10 +27,10 @@ M.BarSection {
onRead: line => { onRead: line => {
try { try {
const d = JSON.parse(line); const d = JSON.parse(line);
const cls = d.class ?? ""; const alt = d.alt ?? "";
root.count = d.count ?? 0; root.count = parseInt(d.text) || 0;
root.dnd = cls.includes("dnd"); root.dnd = alt.startsWith("dnd");
root.inhibited = cls.includes("inhibited"); root.inhibited = alt.includes("inhibited");
} catch (e) {} } catch (e) {}
} }
} }