Merge branch 'main' of https://git.snaile.de/luca/dotfiles
This commit is contained in:
commit
2c68eb16b4
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# battery status file is sent in as an argument from sb-battery
|
# battery status file is sent in as an argument from sb-battery
|
||||||
|
|
||||||
while inotifywait -e modify "$1/status"; do
|
# while inotifywait -e modify "$1/status"; do
|
||||||
pkill -RTMIN+3 dwmblocks || break
|
# pkill -RTMIN+3 dwmblocks || break
|
||||||
done
|
# done
|
||||||
|
|
|
@ -4,7 +4,7 @@ shift=""
|
||||||
if ls /sys/class/net/w*/operstate 1>/dev/null 2>&1; then
|
if ls /sys/class/net/w*/operstate 1>/dev/null 2>&1; then
|
||||||
for w in /sys/class/net/w*/; do
|
for w in /sys/class/net/w*/; do
|
||||||
percent="$(cat /proc/net/wireless | grep "$(basename "$(dirname $w/operstate)")" | tr -s ' ' | cut -d ' ' -f3 | tr -dc "[:digit:]")"
|
percent="$(cat /proc/net/wireless | grep "$(basename "$(dirname $w/operstate)")" | tr -s ' ' | cut -d ' ' -f3 | tr -dc "[:digit:]")"
|
||||||
grep -vxq '0x1003' "$w/flags" && wifi_icon="" || wifi_icon="$(sed "s/up/直/;s/down/睊/" $w/operstate | tr -d "[:space:]")"
|
grep -vxq '0x1003' "$w/flags" && wifi_icon="" || wifi_icon="$(sed "s/up/直/;s/down/睊/;s/dormant/睊/" $w/operstate | tr -d "[:space:]")"
|
||||||
printf "$shift\033[11m%s\033[10m %s" "$wifi_icon" "$percent"
|
printf "$shift\033[11m%s\033[10m %s" "$wifi_icon" "$percent"
|
||||||
shift=" "
|
shift=" "
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue