mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
native NetworkManager + all native dbus bindings via dms
- Scrap janky NetworkService in favor of, dms' native NM integration socket - Scrap all gdbus usage in favor of native dbus bindings in dms (loginctl, freedesktop) It means that - some features won't work if running without dms wrapper. But the trade off is certainly worth it, in the long-run for efficiency improvements.
This commit is contained in:
@@ -9,6 +9,20 @@ import Quickshell.Io
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property int refCount: 0
|
||||
|
||||
onRefCountChanged: {
|
||||
console.log("VpnService: refCount changed to", refCount)
|
||||
if (refCount > 0 && !nmMonitor.running) {
|
||||
console.log("VpnService: Starting nmMonitor")
|
||||
nmMonitor.running = true
|
||||
refreshAll()
|
||||
} else if (refCount === 0 && nmMonitor.running) {
|
||||
console.log("VpnService: Stopping nmMonitor")
|
||||
nmMonitor.running = false
|
||||
}
|
||||
}
|
||||
|
||||
// State
|
||||
property bool available: true
|
||||
property bool isBusy: false
|
||||
@@ -36,18 +50,6 @@ Singleton {
|
||||
|
||||
// Use implicit property notify signals (profilesChanged, activeUuidChanged, etc.)
|
||||
|
||||
Component.onCompleted: initialize()
|
||||
|
||||
Component.onDestruction: {
|
||||
nmMonitor.running = false
|
||||
}
|
||||
|
||||
function initialize() {
|
||||
// Start monitoring NetworkManager for changes
|
||||
nmMonitor.running = true
|
||||
refreshAll()
|
||||
}
|
||||
|
||||
function refreshAll() {
|
||||
listProfiles()
|
||||
refreshActive()
|
||||
|
||||
Reference in New Issue
Block a user