aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/awesome-widgets/widget-disks
blob: d0fab3c1807b6ab0c72bcb941c95211a490b7ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

location=${1:-/}

[ -d "$location" ] || exit

case "$location" in
	"/home"* ) icon="🏠" ;;
	"/run/media"* ) icon="💾" ;;
	*) icon="🖥";;
esac

printf "%s%s" " $icon " "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2 " "} ')"