28 lines
601 B
QML
28 lines
601 B
QML
pragma Singleton
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import "../../../../config"
|
|
|
|
Item {
|
|
property int idle: 0
|
|
|
|
Process {
|
|
id: statusScript
|
|
command: ["sh", "-c", Config.configDir + "/modules/bar/scripts/Idle.sh --status"]
|
|
running: true
|
|
stdout: StdioCollector {
|
|
onStreamFinished: {
|
|
idle = this.text.trim() === "0" ? 1 : 0
|
|
}
|
|
}
|
|
}
|
|
|
|
Timer {
|
|
interval: 5000
|
|
running: true
|
|
repeat: true
|
|
triggeredOnStart: true
|
|
onTriggered: statusScript.running = true
|
|
}
|
|
} |