Skip to content

Commit

Permalink
Merge pull request #350 from Maverobot/master
Browse files Browse the repository at this point in the history
wifi: use iw instead of /proc/net/wireless
  • Loading branch information
denisse-dev authored Nov 14, 2020
2 parents 2dcf901 + 260bc6a commit 3fc2f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wifi/wifi
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi

#------------------------------------------------------------------------

QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
QUALITY=$(iw dev ${INTERFACE} link | grep 'dBm$' | grep -Eoe '-[0-9]{2}' | awk '{print ($1 > -50 ? 100 :($1 < -100 ? 0 : ($1+100)*2))}')

#------------------------------------------------------------------------

Expand Down

0 comments on commit 3fc2f69

Please sign in to comment.