network: fix strength prop

This commit is contained in:
end-4
2026-03-14 21:56:40 +01:00
parent e2aa71b59e
commit 8ca3ef773a
@@ -33,7 +33,7 @@ Singleton {
property string wifiStatus: "disconnected" property string wifiStatus: "disconnected"
property string networkName: "" property string networkName: ""
property int networkStrength property int networkStrength: active?.strength ?? 0
// Control // Control
function enableWifi(enabled = true): void { function enableWifi(enabled = true): void {
@@ -139,7 +139,6 @@ Singleton {
updateConnectionType.startCheck(); updateConnectionType.startCheck();
wifiStatusProcess.running = true wifiStatusProcess.running = true
updateNetworkName.running = true; updateNetworkName.running = true;
updateNetworkStrength.running = true;
} }
Process { Process {
@@ -212,17 +211,6 @@ Singleton {
} }
} }
Process {
id: updateNetworkStrength
running: true
command: ["sh", "-c", "nmcli -f IN-USE,SIGNAL,SSID device wifi | awk '/^\\*/{if (NR!=1) {print $2}}'"]
stdout: SplitParser {
onRead: data => {
root.networkStrength = parseInt(data);
}
}
}
Process { Process {
id: wifiStatusProcess id: wifiStatusProcess
command: ["nmcli", "radio", "wifi"] command: ["nmcli", "radio", "wifi"]