statusbar: added special case for inet

master
tiyn 1 year ago
parent 3c19fddd90
commit 6670354d1a

@ -1,8 +1,8 @@
#!/usr/bin/env sh
wifipercent=" ___"
wifipercent=" "
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^"
([ "$(cat /sys/class/net/w*/operstate)" = 'down' ] || ! [[ "/sys/class/net/w*/operstate" ]]) && wifiicon="^c#ff0000^ ^d^" && wifipercent=0
[ ! -n "${wifiicon+var}" ] && wifiicon="^c#dfdfdf^ ^d^" && wifipercent=$(grep "^\s*w" /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')

Loading…
Cancel
Save