mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-02 04:37:49 +02:00
Refresh idle indicator on bar IPC
This commit is contained in:
@@ -82,6 +82,8 @@ Item {
|
||||
readonly property bool vertical: position === "left" || position === "right"
|
||||
readonly property int barSize: vertical ? 28 : 26
|
||||
|
||||
signal indicatorsRefreshRequested()
|
||||
|
||||
function normalizePosition(value) {
|
||||
var next = String(value || "").trim()
|
||||
return /^(top|bottom|left|right)$/.test(next) ? next : "top"
|
||||
@@ -417,6 +419,7 @@ Item {
|
||||
function refreshIndicators() {
|
||||
refreshScreenRecording()
|
||||
runProcess(notificationSilencingProc)
|
||||
indicatorsRefreshRequested()
|
||||
}
|
||||
|
||||
function workspaceById(id) {
|
||||
|
||||
@@ -25,6 +25,12 @@ Item {
|
||||
|
||||
Component.onCompleted: refresh()
|
||||
|
||||
Connections {
|
||||
target: root.bar
|
||||
ignoreUnknownSignals: true
|
||||
function onIndicatorsRefreshRequested() { root.refresh() }
|
||||
}
|
||||
|
||||
Process {
|
||||
id: statusProc
|
||||
command: ["bash", "-lc", "pgrep -x hypridle >/dev/null 2>&1 && echo running || echo stopped"]
|
||||
|
||||
Reference in New Issue
Block a user