Each `bash -lc` starts a login shell that re-sources the profile (mise activation, /etc/profile.d) on every invocation — ~16 forks per call versus ~2 for `bash -c` — which taxes every menu/panel/launcher action the shell shells out for. The session already exports PATH and env to the shell, so omarchy commands resolve fine under `bash -c`. Switch the internal/omarchy-owned spawns (theme+background switches, brightness, monitor scaling, DNS, lock/fingerprint, keyboard-layout probe, voxtype status, and the `:`/printf state-file writes) to `bash -c`. Leave `bash -lc` on the sites that run user-configurable commands (custom bar-widget exec, menu provider/guard scripts, launcher scan commands, configurable idle/screensaver command), where a user's command may rely on their login environment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
39 lines
778 B
QML
39 lines
778 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", "-c", "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")
|
|
}
|
|
}
|