diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-06-03 20:12:49 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-06-03 20:12:49 +0200 |
commit | 5b9ff2c334a3a85c25b11bc17009f211eec51575 (patch) | |
tree | ff8d82f8a952e6f3006aec99a758f10a5592e74a /pw-biff | |
parent | f0b527f61e251a879a179ff4fef16baaa486c047 (diff) | |
download | scripts-5b9ff2c334a3a85c25b11bc17009f211eec51575.tar.gz scripts-5b9ff2c334a3a85c25b11bc17009f211eec51575.tar.bz2 scripts-5b9ff2c334a3a85c25b11bc17009f211eec51575.zip |
update
Diffstat (limited to 'pw-biff')
-rwxr-xr-x | pw-biff | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# run from cron + +if [ -z $1 ]; then + exit +fi + +export DISPLAY=:0.0 +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus + +maildir="$HOME/.mail/$1/Inbox/new/" + +mailcount=$(find $maildir -type f | wc -l) + +if (("$mailcount" > 0)); then + + /usr/local/bin/dunstify \ + -t 5000 \ + -a "You have mail" \ + -u normal \ + -i internet-mail-symbolic \ + -h string:x-dunst-stack-tag:Mail "$1 has mail: $mailcount messages" + +fi |