added networkmanager
This commit is contained in:
27
Services/NetworkManager.qml
Normal file
27
Services/NetworkManager.qml
Normal 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 = [""];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,3 +5,4 @@ singleton WorkspaceManager 1.0 WorkspaceManager.qml
|
|||||||
singleton BluetoothManager 1.0 BluetoothManager.qml
|
singleton BluetoothManager 1.0 BluetoothManager.qml
|
||||||
singleton MprisManager 1.0 MprisManager.qml
|
singleton MprisManager 1.0 MprisManager.qml
|
||||||
singleton BatteryManager 1.0 BatteryManager.qml
|
singleton BatteryManager 1.0 BatteryManager.qml
|
||||||
|
singleton NetworkManager 1.0 NetworkManager.qml
|
||||||
|
|||||||
Reference in New Issue
Block a user