statusbar-scripts/sb-disk-space

21 lines
525 B
Plaintext
Raw Permalink Normal View History

2023-08-23 19:45:38 +02:00
#!/bin/env bash
. sb-theme
while read -a Line; do
# if [ "${Line[5]}" == '/' ]; then
# root_size=${Line[1]}
# root_free=${Line[3]}
# fi
if [ "${Line[5]}" == '/home' ]; then
home_size=${Line[1]}
home_free=${Line[2]}
home_percent=${Line[4]}
break
fi
done <<< "$(df -h -x devtmpfs -x tmpfs -x usbfs -x loop)"
2023-12-10 19:00:10 +01:00
# display "󰋊 $root_free/$root_size|$home_free/$home_size" $1
# display "󰋊 $home_free/$home_size $home_percent" $1
display "󰋊 $home_percent" $1