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

10 lines
227 B
Bash
Executable File

#!/bin/sh
# $1 should be drive mountpoint, otherwise assumed /.
reset="\033[0m"
big="\033[11m"
location=${1:-/}
[ -d "$location" ] || exit
printf "%b" "$big$reset $(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n"