diff --git a/de/home/.local/bin/diskspace-check b/de/home/.local/bin/diskspace-check new file mode 100755 index 0000000..2b273a4 --- /dev/null +++ b/de/home/.local/bin/diskspace-check @@ -0,0 +1,10 @@ +#!/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 diff --git a/de/include b/de/include index 143946e..24b3a27 100644 --- a/de/include +++ b/de/include @@ -39,3 +39,4 @@ .config/qt5ct/qt5ct.conf .config/nwg-look/config .local/bin/gocryptfs-wofi +.local/bin/diskspace-check