From 1d6f44dc55a5ff0fe8b6a4df44fc4d2f786534d8 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Sun, 7 Sep 2025 16:59:51 +0000 Subject: polybar: Add linux storage script --- polybar/Linux-storage.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 polybar/Linux-storage.sh 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 -- cgit v1.2.3