summaryrefslogtreecommitdiffstats
path: root/polybar/OpenBSD-storage.sh
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-07 18:47:52 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-07 18:48:21 +0200
commit875b3add8f4e265eeabd125472fb6d5186d3f8d5 (patch)
tree8dba6a51a060fecec8d58e0777925698624a704e /polybar/OpenBSD-storage.sh
parent8e40fea5c0e42dc1204d35292e350d660ee3ed95 (diff)
downloaddots-875b3add8f4e265eeabd125472fb6d5186d3f8d5.tar.gz
polybar: Add config
Diffstat (limited to 'polybar/OpenBSD-storage.sh')
-rwxr-xr-xpolybar/OpenBSD-storage.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/polybar/OpenBSD-storage.sh b/polybar/OpenBSD-storage.sh
new file mode 100755
index 0000000..6acd8b4
--- /dev/null
+++ b/polybar/OpenBSD-storage.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+function print_line() {
+ echo -n "%{F#555}$1: %{F-}$2 "
+}
+
+while true; do
+ while IFS= read -r LINE; do
+ PART="$(awk '{print $1}' <<< $LINE)"
+ PERC="$(awk '{print $5}' <<< $LINE)"
+ print_line ${PART: -1} $PERC
+ done <<< "$(df | grep '/dev/' | sort)"
+ echo
+ sleep 5
+done