From 858ac26fdcb30e99d5219b08401021b141573b6b Mon Sep 17 00:00:00 2001 From: Honney Date: Fri, 19 Jun 2026 15:00:34 +0200 Subject: [PATCH] fix to network --- modules/bar/states/Network/NetworkState.qml | 8 ++++---- modules/bar/widgets/Network.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/bar/states/Network/NetworkState.qml b/modules/bar/states/Network/NetworkState.qml index 1cbbe15..9f9ac3d 100644 --- a/modules/bar/states/Network/NetworkState.qml +++ b/modules/bar/states/Network/NetworkState.qml @@ -55,7 +55,7 @@ QtObject { " echo \"TX_BYTES=$(cat /sys/class/net/$ACTIVE/statistics/tx_bytes 2>/dev/null || echo 0)\"; " + "fi; " + "echo '===WIFI==='; " + - "nmcli -t -f IN-USE,SSID,SIGNAL,CHAN,FREQ,RATE device wifi 2>/dev/null | grep '^\\\\*' | head -1 | sed 's/^\\*://'; " + + "nmcli -t -f active,ssid,signal,chan,freq,rate dev wifi | awk -F: '$1==\"yes\" { $1=\"\"; sub(/^:/,\"\"); print }'; " + "echo '===PING==='; " + "ping -c 1 -W 2 1.1.1.1 2>/dev/null | awk -F/ '/rtt/{print $5}' || echo ''; " + "echo '===INTERNET==='; " + @@ -171,12 +171,12 @@ QtObject { // Parse WIFI section if (wifiSection) { - var wifiParts = wifiSection.split(":") + var wifiParts = wifiSection.split(" ") if (wifiParts.length >= 2) { root.signalStrength = wifiParts[1] || "" if (wifiParts.length >= 3) root.wifiChannel = wifiParts[2] || "" - if (wifiParts.length >= 4) root.wifiFrequency = wifiParts[3] || "" - if (wifiParts.length >= 5) root.linkSpeed = wifiParts[4] || "" + if (wifiParts.length >= 4) root.wifiFrequency = wifiParts[3] + " " + wifiParts[4] || "" + if (wifiParts.length >= 5) root.linkSpeed = wifiParts[5] + " " + wifiParts[6] || "" } } diff --git a/modules/bar/widgets/Network.qml b/modules/bar/widgets/Network.qml index 214ddae..8df54ce 100644 --- a/modules/bar/widgets/Network.qml +++ b/modules/bar/widgets/Network.qml @@ -41,7 +41,7 @@ MouseArea { property int count: 17 property var texts: [text1, text2, text3, text4, text5, text6, text7, text8, text9, text10, text11, text12, text13, text14, text15, text16, text17] implicitWidth: Config.maxTextWidth(count, texts) + (Config.spacing_fun(networkButton.height) * 3) - implicitHeight: text1.height*count+(Config.spacing_fun(networkButton.height) * (count + 2)) + implicitHeight: (text1.height*count)+(Config.spacing_fun(networkButton.height) * (count + 4)) Column { width: parent.width