temporarily disable sbd-battery, catch "dormant" wifi adapter state
This commit is contained in:
parent
b6223ca0c0
commit
696792c9ce
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
# battery status file is sent in as an argument from sb-battery
|
||||
|
||||
while inotifywait -e modify "$1/status"; do
|
||||
pkill -RTMIN+3 dwmblocks || break
|
||||
done
|
||||
# while inotifywait -e modify "$1/status"; do
|
||||
# pkill -RTMIN+3 dwmblocks || break
|
||||
# done
|
||||
|
|
|
@ -4,7 +4,7 @@ shift=""
|
|||
if ls /sys/class/net/w*/operstate 1>/dev/null 2>&1; then
|
||||
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:]")"
|
||||
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"
|
||||
shift=" "
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue