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
|
|
@ -68,8 +68,24 @@ M.BarSection {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Event-driven: re-poll on any network change
|
||||
Process {
|
||||
id: monitor
|
||||
running: true
|
||||
command: ["nmcli", "monitor"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
onRead: _debounce.restart()
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
interval: M.Modules.network.interval || 5000
|
||||
id: _debounce
|
||||
interval: 300
|
||||
onTriggered: proc.running = true
|
||||
}
|
||||
// Fallback poll
|
||||
Timer {
|
||||
interval: 60000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: proc.running = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue