Add cron-notify script

This commit is contained in:
ItsDrike 2021-07-23 01:56:03 +02:00
parent 4988a0b970
commit 55c063d9b3
No known key found for this signature in database
GPG key ID: B5F6B41F708C3ADD

12
root/usr/local/bin/cron-notify Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# Crontab requires DISPLAY and XDG_RUNTIME_HOME
# to be set when running notify-send, this script
# makes defines those to make it eaiser to send
# notifications from crontab without cluttering it
# It sets "Cron Notification" title, rest of the
# arguments are passed to notfiy-send
XDG_RUNTIME_DIR="/run/user/$(id -u)" \
DISPLAY=:0 \
notify-send "Cron Notification" $@