internet script more efficient
This commit is contained in:
parent
54f22aab7b
commit
1f24837952
1 changed files with 3 additions and 4 deletions
|
@ -10,8 +10,7 @@ case $BLOCK_BUTTON in
|
||||||
" ;;
|
" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
|
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡" ||
|
||||||
|
wifiicon=$(grep "^\s*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\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate)"
|
||||||
|
|
||||||
printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"
|
|
||||||
|
|
Loading…
Reference in a new issue