2019-09-13 21:03:54 +02:00
|
|
|
#!/usr/bin/env sh
|
2019-09-07 17:42:18 +02:00
|
|
|
|
|
|
|
# Status bar module for disk space
|
|
|
|
# $1 should be drive mountpoint
|
|
|
|
# $2 is optional icon, otherwise mountpoint will displayed
|
2020-04-02 00:06:34 +02:00
|
|
|
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
2019-09-07 17:42:18 +02:00
|
|
|
|
2020-05-29 18:31:15 +02:00
|
|
|
disk="/"
|
|
|
|
[ ! -z "$1" ] && disk="$1"
|
2019-09-07 17:42:18 +02:00
|
|
|
|
|
|
|
icon="$2"
|
2020-05-29 18:31:15 +02:00
|
|
|
[ -z "$2" ] && icon="$disk"
|
2019-09-07 17:42:18 +02:00
|
|
|
|
2020-05-29 18:31:15 +02:00
|
|
|
printf " %s %s\n" "$icon" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"
|