From 396eaa2bda6ac4f2f7dad7cfa52f5343f8342192 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 10 Nov 2025 20:48:28 +0100 Subject: polybar: Only show partitions in OpenBSD if less than 50% free /home is always visible. --- polybar/OpenBSD-storage.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/polybar/OpenBSD-storage.sh b/polybar/OpenBSD-storage.sh index 6acd8b4..5266e6f 100755 --- a/polybar/OpenBSD-storage.sh +++ b/polybar/OpenBSD-storage.sh @@ -8,7 +8,12 @@ while true; do while IFS= read -r LINE; do PART="$(awk '{print $1}' <<< $LINE)" PERC="$(awk '{print $5}' <<< $LINE)" - print_line ${PART: -1} $PERC + if [[ "${PART: -1}" != "d" && \ + "${PERC:: -1}" -le 50 ]]; then + continue + fi + MNT="$(awk '{print $6}' <<< $LINE)" + print_line "${MNT}" "${PERC}" done <<< "$(df | grep '/dev/' | sort)" echo sleep 5 -- cgit v1.2.3