forked from Shinonome/dots-hyprland
network: fix strength prop
This commit is contained in:
@@ -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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user