1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 02:17:44 +01:00

10 lines
372 B
Plaintext
Raw Normal View History

2019-09-13 21:03:54 +02:00
#!/usr/bin/env sh
2019-09-07 17:42:18 +02:00
2020-04-02 00:06:34 +02:00
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡"
2019-09-07 17:42:18 +02:00
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }')
2019-09-07 17:42:18 +02:00
printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")"