fix to network
This commit is contained in:
@@ -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] || ""
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user