sb

shitty bar for dwm
git clone git://git.ckyln.com/~cem/sb.git
Log | Files | Refs | README | LICENSE

sb_storage (370B)


      1 # gets storage information from df
      2 # prints used/available
      3 
      4 storage() {
      5 	DISK="$1"
      6 	[ -z "$DISK" ] && DISK="/"
      7 	printf "$DISK: "
      8         command df -h | while read -r _ size used _ _ mnt; do
      9             [ "$mnt" = "$DISK" ] || continue
     10             used=${used%G} size=${size%G}
     11             printf "$used/$size GB"
     12             break
     13         done
     14 	printf " $DELIMITER "
     15 }