mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
network: fix strength prop
This commit is contained in:
@@ -33,7 +33,7 @@ Singleton {
|
||||
property string wifiStatus: "disconnected"
|
||||
|
||||
property string networkName: ""
|
||||
property int networkStrength
|
||||
property int networkStrength: active?.strength ?? 0
|
||||
|
||||
// Control
|
||||
function enableWifi(enabled = true): void {
|
||||
@@ -139,7 +139,6 @@ Singleton {
|
||||
updateConnectionType.startCheck();
|
||||
wifiStatusProcess.running = true
|
||||
updateNetworkName.running = true;
|
||||
updateNetworkStrength.running = true;
|
||||
}
|
||||
|
||||
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 {
|
||||
id: wifiStatusProcess
|
||||
command: ["nmcli", "radio", "wifi"]
|
||||
|
||||
Reference in New Issue
Block a user