summaryrefslogtreecommitdiffstats
path: root/disk
diff options
context:
space:
mode:
Diffstat (limited to 'disk')
-rwxr-xr-xdisk4
1 files changed, 4 insertions, 0 deletions
diff --git a/disk b/disk
new file mode 100755
index 0000000..21e6a02
--- /dev/null
+++ b/disk
@@ -0,0 +1,4 @@
+#!/bin/sh
+AVAIL=$(df -h --output=avail '/' | tail -1)
+[ ${AVAIL%?} -le 50 ] && COLOR=$(echo '\004') || COLOR=''
+printf '%s%s%s\001' $COLOR " " $AVAIL