From 635c4ebe0aae63eafb3119f0b8cef6f057759b62 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 13 May 2022 15:22:33 +0200 Subject: mail-checknow is unused now --- old/mail-checknow | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 old/mail-checknow (limited to 'old') diff --git a/old/mail-checknow b/old/mail-checknow new file mode 100755 index 0000000..188042b --- /dev/null +++ b/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