Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
366 B

  1. #!/usr/bin/env sh
  2. # Status bar module for disk space
  3. # $1 should be drive mountpoint
  4. # $2 is optional icon, otherwise mountpoint will displayed
  5. # by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
  6. disk="/"
  7. [ ! -z "$1" ] && disk="$1"
  8. icon="$2"
  9. [ -z "$2" ] && icon="$disk"
  10. printf " %s %s\n" "$icon" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"