From 696792c9ced50ecfc71bfdbc8565f9336fc61a33 Mon Sep 17 00:00:00 2001
From: Luca Bilke <bilke@tralios.de>
Date: Tue, 14 Feb 2023 10:23:20 +0100
Subject: [PATCH] temporarily disable sbd-battery, catch "dormant" wifi adapter
 state

---
 .local/bin/daemons/sbd-battery   | 6 +++---
 .local/bin/statusbar/sb-internet | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.local/bin/daemons/sbd-battery b/.local/bin/daemons/sbd-battery
index ed4996de..64b80d1c 100755
--- a/.local/bin/daemons/sbd-battery
+++ b/.local/bin/daemons/sbd-battery
@@ -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
diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet
index f1838fe3..e37c0414 100755
--- a/.local/bin/statusbar/sb-internet
+++ b/.local/bin/statusbar/sb-internet
@@ -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