2022-05-11 13:26:31 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then
|
|
|
|
wifiicon="$(awk '/^\s*w/ { print "WiFi", int($3 * 100 / 70) "% " }' /proc/net/wireless)"
|
|
|
|
fi
|
|
|
|
|
2022-05-16 11:39:33 +02:00
|
|
|
printf " %s%s%s" "$wifiicon" "$(sed "s/down//;s/up/Ethernet/" /sys/class/net/e*/operstate 2>/dev/null)"
|