1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 18:17:45 +01:00

14 lines
341 B
Plaintext
Raw Normal View History

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
[ -z "$1" ] && exit
icon="$2"
[ -z "$2" ] && icon="$1"
2019-09-13 21:03:54 +02:00
printf "%s: %s\n" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"