mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-04 20:28:23 +02:00
39 lines
779 B
QML
39 lines
779 B
QML
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: "Dictate"
|
|
|
|
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() {
|
|
if (!root.bar) return
|
|
root.bar.run("omarchy-voxtype-config")
|
|
}
|
|
}
|