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 bool vertical: position === "left" || position === "right"
|
||||||
readonly property int barSize: vertical ? 28 : 26
|
readonly property int barSize: vertical ? 28 : 26
|
||||||
|
|
||||||
|
signal indicatorsRefreshRequested()
|
||||||
|
|
||||||
function normalizePosition(value) {
|
function normalizePosition(value) {
|
||||||
var next = String(value || "").trim()
|
var next = String(value || "").trim()
|
||||||
return /^(top|bottom|left|right)$/.test(next) ? next : "top"
|
return /^(top|bottom|left|right)$/.test(next) ? next : "top"
|
||||||
@@ -417,6 +419,7 @@ Item {
|
|||||||
function refreshIndicators() {
|
function refreshIndicators() {
|
||||||
refreshScreenRecording()
|
refreshScreenRecording()
|
||||||
runProcess(notificationSilencingProc)
|
runProcess(notificationSilencingProc)
|
||||||
|
indicatorsRefreshRequested()
|
||||||
}
|
}
|
||||||
|
|
||||||
function workspaceById(id) {
|
function workspaceById(id) {
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ Item {
|
|||||||
|
|
||||||
Component.onCompleted: refresh()
|
Component.onCompleted: refresh()
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: root.bar
|
||||||
|
ignoreUnknownSignals: true
|
||||||
|
function onIndicatorsRefreshRequested() { root.refresh() }
|
||||||
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: statusProc
|
id: statusProc
|
||||||
command: ["bash", "-lc", "pgrep -x hypridle >/dev/null 2>&1 && echo running || echo stopped"]
|
command: ["bash", "-lc", "pgrep -x hypridle >/dev/null 2>&1 && echo running || echo stopped"]
|
||||||
|
|||||||
Reference in New Issue
Block a user