added networkmanager

This commit is contained in:
2026-08-07 16:18:24 +01:00
parent d54487022f
commit 6f3e62bcf9
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Networking
Singleton {
id: root
property NetworkDevice defaultAdapter: Networking.devices.values[0]
function getConnectivity() {
if (Networking.connectivity == NetworkConnectivity.Full) {
return 0;
// if ethernet hide ts (return 2)
} else if (Networking.connectivity == NetworkConnectivity.Limited || Networking.connectivity
== NetworkConnectivity.Portal) {
return 1;
} else {
return 2;
}
}
function getIcon() {
let state = getConnectivity();
let iconArr = [""];
}
}