summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-07 16:59:51 +0000
committerChristoph Schlosser <christoph@linux.com>2025-09-07 16:59:51 +0000
commit1d6f44dc55a5ff0fe8b6a4df44fc4d2f786534d8 (patch)
tree2e379b175d2a4895495ff8cba90b8a90c9ba88b9
parentfc80d856863589de9d61755860d4394d5c3fd35e (diff)
downloaddots-1d6f44dc55a5ff0fe8b6a4df44fc4d2f786534d8.tar.gz
polybar: Add linux storage script
-rwxr-xr-xpolybar/Linux-storage.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/polybar/Linux-storage.sh b/polybar/Linux-storage.sh
new file mode 100755
index 0000000..8017785
--- /dev/null
+++ b/polybar/Linux-storage.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+function print_line() {
+ echo -n "%{F#555}$1: %{F-}$2 "
+}
+
+while true; do
+ for l in void-os void-home; do
+ LINE=$(df | grep "$l")
+ PART="$(awk '{print $1}' <<< $LINE)"
+ PERC="$(awk '{print $5}' <<< $LINE)"
+ print_line $(awk -F'-' '{print $2}' <<< $PART) $PERC
+ done
+ echo
+ sleep 5
+done