quickshell/modules/Services/Network.qml~
2026-08-26 19:01:48 +02:00

21 lines
503 B
QML

pragma Singleton
import Quickshell
import Quickshell.Networking
Singleton {
id: root
property bool wifiEnabled: Networking.wifiEnabled
property string connectivity: Networking.connectivity.toString(Networking.connectivity)
readonly property list<NetworkDevice> devices: Networking.devices.values
function getConnectedDevice() {
for(let i=0; i < devices.length; ++i) {
console.log(i)
if(devices[i].connected) {
return devices[i];
}
return null;
}
}
}