init
This commit is contained in:
5
notify-disk-space
Executable file
5
notify-disk-space
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=/run/user/${UID}/bus}"
|
||||||
|
#export DISPLAY=:0
|
||||||
|
|
||||||
|
for i in $(df --output=pcent);do per=${i%*\%} ;if [ $per -gt 85 ] ;then notify-send "Check diskspace!" ;fi ;done
|
||||||
6
notify-disk-space.service
Normal file
6
notify-disk-space.service
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Check for disk space usage
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/notify-disk-space
|
||||||
10
notify-disk-space.timer
Normal file
10
notify-disk-space.timer
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Check disk usage periodically
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=5min
|
||||||
|
OnUnitActiveSec=10min
|
||||||
|
Unit=notify-disk-space.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
||||||
Reference in New Issue
Block a user