Split out indicators

This commit is contained in:
David Heinemeier Hansson
2026-05-20 13:05:56 +02:00
parent 8476fa7d82
commit 3b9700682c
12 changed files with 527 additions and 162 deletions
@@ -0,0 +1,39 @@
import QtQuick
import Quickshell.Io
import qs.Ui
BarIndicator {
id: root
property string state: "idle"
property string icon: ""
active: state === "recording"
activeText: icon
inactiveText: "󰍬"
activeTooltipText: state
inactiveTooltipText: "Dictation"
function update(raw) {
var data = extractData(raw)
state = String(data.alt || data.class || "idle")
if (state === "recording") icon = "󰍬"
else if (state === "transcribing") icon = "󰔟"
else icon = ""
}
Process {
command: ["bash", "-lc", "omarchy-voxtype-status"]
running: true
stdout: SplitParser {
onRead: function(data) { root.update(data) }
}
}
onPressed: function(button) {
if (!root.bar) return
if (button === Qt.RightButton) root.bar.run("omarchy-voxtype-config")
else root.bar.run("omarchy-voxtype-model")
}
}