1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

black and white it is

This commit is contained in:
TiynGER
2020-05-29 18:31:15 +02:00
parent 3bef227e83
commit 9991393c8e
7 changed files with 15 additions and 14 deletions

View File

@@ -2,8 +2,8 @@
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon=""
[ ! -n "${wifiicon+var}" ] && 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" "$(cat /sys/class/net/e*/operstate | sed "s/down//;s/up/🌐/")"
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down//;s/up//")" "$wifiicon"