Merge pull request #152 from fatalhalt/master
i3internet: strip leading whitespace from /proc/net/wireless output
This commit is contained in:
commit
2cc57b101f
1 changed files with 1 additions and 1 deletions
|
@ -13,6 +13,6 @@ esac
|
|||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep ^w /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
|
||||
|
||||
printf "%s %s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
||||
|
|
Loading…
Reference in a new issue