From 2386ff415476ef106e891d22a2149a42bde6999b Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 4 Oct 2025 19:35:12 +0800 Subject: a --- launcher/components/IComponent.qml | 0 services/Network.qml | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) delete mode 100644 launcher/components/IComponent.qml diff --git a/launcher/components/IComponent.qml b/launcher/components/IComponent.qml deleted file mode 100644 index e69de29..0000000 diff --git a/services/Network.qml b/services/Network.qml index 1834f23..e94f1a6 100644 --- a/services/Network.qml +++ b/services/Network.qml @@ -14,12 +14,21 @@ Singleton { property bool ethernet: false property string networkName: "" property int networkStrength + property int count property string state: ethernet ? Icons.resource.network.wifi : (networkName.length >= 0 && networkName !== "lo") ? (networkStrength >= 90 ? Icons.resource.network.wifi.max : networkStrength >= 80 ? Icons.resource.network.wifi.high : networkStrength >= 60 ? Icons.resource.network.wifi.mid : networkStrength >= 40 ? Icons.resource.network.wifi.low : networkStrength >= 20 ? Icons.resource.network.wifi.min : Icons.resource.network.disconnected) : Icons.resource.network.disconnected + property alias updateNetworkNameProc: updateNetworkName function update() { - updateConnectionType.startCheck(); - updateNetworkName.running = true; updateNetworkStrength.running = true; + if (count >= 50) { + updateNetworkName.running = true; + count = 0; + } + count++; + } + + Component.onCompleted: { + updateConnectionType.startCheck(); } Timer { @@ -35,7 +44,7 @@ Singleton { Process { id: updateConnectionType property string buffer - command: ["nmcli", "-t", "-f", "NAME,TYPE,DEVICE", "c", "show", "--active"] + command: ["nmcli", "-t", "-f", "TYPE", "c", "show", "--active"] running: true function startCheck() { buffer = ""; -- cgit v1.2.3