event-driven network/bluetooth/powerprofile via dbus-monitor + nmcli monitor
This commit is contained in:
parent
b06e3582ff
commit
0568f71d1b
3 changed files with 49 additions and 3 deletions
|
|
@ -41,8 +41,23 @@ M.BarSection {
|
|||
onStreamFinished: root._parse(text)
|
||||
}
|
||||
}
|
||||
// Event-driven: watch BlueZ DBus property changes
|
||||
Process {
|
||||
id: btMonitor
|
||||
running: true
|
||||
command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path_namespace='/org/bluez'\" 2>/dev/null"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
onRead: _debounce.restart()
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
interval: M.Modules.bluetooth.interval || 5000
|
||||
id: _debounce
|
||||
interval: 500
|
||||
onTriggered: proc.running = true
|
||||
}
|
||||
Timer {
|
||||
interval: 60000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: proc.running = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue