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

9 lines
365 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
2023-10-16 23:49:04 +02:00
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon=" ^d^ -%"
2019-09-07 17:42:18 +02:00
2023-10-16 23:49:04 +02:00
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print " ^d^", int($3 * 100 / 70) "%" }')
2019-09-07 17:42:18 +02:00
2023-10-16 23:49:04 +02:00
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down/^b#282828^^c#dfdfdf^  /;s/up/^b#282828^^c#dfdfdf^ 󰈀 /")" "$wifiicon"