1
0
Fork 0
dotfiles/.local/libexec/statusbar/sb-disk

17 lines
356 B
Plaintext
Raw Normal View History

2022-07-04 21:36:33 +02:00
#!/bin/sh
2023-11-21 14:34:46 +01:00
IFS='
'
2024-02-03 19:40:51 +01:00
types=${SB_DISK_FS:-ext2,ext3,ext4,xfs,btrfs}
2023-11-21 14:34:46 +01:00
first=true
for mnt in $(findmnt -Py -t "$types"); do
2024-02-02 19:31:02 +01:00
eval "$mnt"
2024-01-02 19:09:46 +01:00
[ -d "$TARGET" ] || break
[ "$TARGET" = "/var/lib/docker" ] && break
[ "$first" = "false" ] && printf " | "
printf "%b" "${TARGET}: $(df -H "$TARGET" | awk ' /[0-9]/ {print $3 "/" $2}')"
2024-01-02 19:09:46 +01:00
first=false
2023-11-21 14:34:46 +01:00
done
printf "\n"