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.

12 lines
280 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. [ -z "$1" ] && exit
  6. icon="$2"
  7. [ -z "$2" ] && icon="$1"
  8. printf "%s: %s\n" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"