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

12 lines
363 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-05-29 18:31:15 +02:00
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon=""
2019-09-07 17:42:18 +02:00
2020-05-29 18:31:15 +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
2020-05-29 18:31:15 +02:00
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down//;s/up//")" "$wifiicon"
case $BLOCK_BUTTON in
1) $TERMINAL -e "nmtui" ;;
esac