move stuff into components

This commit is contained in:
Damocles 2026-04-12 00:56:17 +02:00
parent 6370732e4e
commit 14292e6683
17 changed files with 81 additions and 149 deletions

View file

@ -1,11 +1,16 @@
import QtQuick
import QtQuick.Controls
import Quickshell.Io
import "." as M
Row {
M.BarSection {
id: root
spacing: 4
tooltip: {
const parts = [root.count + " notification" + (root.count !== 1 ? "s" : "")];
if (root.dnd) parts.push("Do not disturb");
if (root.inhibited) parts.push("Inhibited");
return parts.join("\n");
}
property int count: 0
property bool dnd: false
@ -56,18 +61,5 @@ Row {
clicker.running = true;
}
}
Process {
id: clicker
}
HoverHandler { id: hover }
ToolTip {
visible: hover.hovered
text: {
const parts = [];
parts.push(root.count + " notification" + (root.count !== 1 ? "s" : ""));
if (root.dnd) parts.push("Do not disturb");
if (root.inhibited) parts.push("Inhibited");
return parts.join("\n");
}
}
Process { id: clicker }
}