From 60052659b98832c78c902e4f27ecee2663d8e913 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 6 May 2026 08:30:49 +0200 Subject: Added scripts --- scripts/old/mail-checknow | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/old/mail-checknow (limited to 'scripts/old/mail-checknow') diff --git a/scripts/old/mail-checknow b/scripts/old/mail-checknow new file mode 100755 index 0000000..188042b --- /dev/null +++ b/scripts/old/mail-checknow @@ -0,0 +1,18 @@ +#!/bin/sh + +# Check for new email, save result to file. +# Requires: mpop, notify-send or similar + +file="$XDG_DATA_HOME/newmail" +#notify="notify-send" +notify=herbe + +l=$(cat "$file") +n=$(mpop -s | awk '/new*./{print $2}') + +if [ -n "$n" ]; then + echo "$n" > "$file" + if [ "$n" != "no" ] && [ "$l" != "$n" ]; then + $notify "New email ($n)" + fi +fi -- cgit v1.3