mirror of https://github.com/tiyn/dotfiles
parent
6876ac5a72
commit
9dd7bc87dc
@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
#
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon=" ^d^ -%"
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="^c#ff0000^ ^d^ -%"
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print " ^d^", int($3 * 100 / 70) "%" }')
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "^c#dfdfdf^ ^d^", int($3 * 100 / 70) "%" }')
|
||||
|
||||
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#dfdfdf^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon"
|
||||
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#ff0000^ /;s/up/^b#282828^^c#dfdfdf^ /")" "$wifiicon"
|
||||
|
Loading…
Reference in new issue