#!/bin/bash

root_use_pct=`df -h | grep '\s/$' | awk '{print $5}' | tr -d '%'`
home_use_pct=`df -h | grep '\s/home$' | awk '{print $5}' | tr -d '%'`
if [[ "${root_use_pct}" -gt 80 ]];then
  notify-send "/ is nearly full!" "${root_use_pct}% disk space usage on /"
fi
if [[ "${home_use_pct}" -gt 80 ]];then
  notify-send "/home is nearly full!" "${home_use_pct}% disk space usage on /home"
fi
