summaryrefslogtreecommitdiffstats
path: root/.local/bin/fetch_mail.sh
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-05 21:58:00 +0200
committerjoe <rbo@gmx.us>2025-10-05 21:58:00 +0200
commite503b89a8858973a495ae5c9b1f086c251ce817c (patch)
treef9e7b303b4ae541c284fc1cbaafde426cbb56f2b /.local/bin/fetch_mail.sh
parentup (diff)
downloaddotfiles-bsd-e503b89a8858973a495ae5c9b1f086c251ce817c.tar.gz
dotfiles-bsd-e503b89a8858973a495ae5c9b1f086c251ce817c.tar.bz2
dotfiles-bsd-e503b89a8858973a495ae5c9b1f086c251ce817c.tar.xz
dotfiles-bsd-e503b89a8858973a495ae5c9b1f086c251ce817c.tar.zst
dotfiles-bsd-e503b89a8858973a495ae5c9b1f086c251ce817c.zip
up
Diffstat (limited to '.local/bin/fetch_mail.sh')
-rwxr-xr-x.local/bin/fetch_mail.sh42
1 files changed, 0 insertions, 42 deletions
diff --git a/.local/bin/fetch_mail.sh b/.local/bin/fetch_mail.sh
deleted file mode 100755
index 115be53..0000000
--- a/.local/bin/fetch_mail.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-export MAIL=$HOME/.local/share/mail
-export GNUPGHOME=$HOME/.local/share/gnupg
-export PASSWORD_STORE_DIR=$HOME/.local/share/pass
-
-mc_file="/tmp/newmailcount"
-if [ -f $mc_file ]; then
- pre_count=$(cat $mc_file)
-else
- pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmx_rbo/INBOX/new | wc -l 2>/dev/null)"
- mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmx_shop/INBOX/new | wc -l 2>/dev/null)"
- #pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
- #mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
- #mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
- pre_count="$((pre_count + mb1))"
-fi
-
-if ! echo test | gpg2 --sign --batch --no-tty --pinentry-mode error -o /dev/null >/dev/null 2>&1; then
- herbe ' GPG locked' >/dev/null 2>&1 &
- exit 1
-fi
-killall mbsync >/dev/null 2>&1
-# herbe ' fetching mail' >/dev/null 2>&1 &
-# {
-mbsync -a || herbe ' failed to fetch mail' >/dev/null 2>&1
-# }&
-# gsleep 0.2
-# kill -74 $(pidof dwmblocks) >/dev/null 2>&1
-# fg
-post_count="$(ls "${MAIL:-/var/mail/jozan}"/gmx_rbo/INBOX/new | wc -l 2>/dev/null)"
-mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmx_shop/INBOX/new | wc -l 2>/dev/null)"
-# pre_count="$(ls "${MAIL:-/var/mail/jozan}"/gmail_br/INBOX/new | wc -l 2>/dev/null)"
-# mb1="$(ls "${MAIL:-/var/mail/jozan}"/gmail_oon/INBOX/new | wc -l 2>/dev/null)"
-# mb2="$(ls "${MAIL:-/var/mail/jozan}"/gmail_tos/INBOX/new | wc -l 2>/dev/null)"
-post_count="$((post_count + mb1))"
-if [ $post_count -gt $pre_count ]; then
- herbe ' '$post_count' new mail(s)' >/dev/null 2>&1 &
-fi
-echo $post_count >$mc_file
-# sleep 1
-# kill -74 $(pidof dwmblocks) >/dev/null 2>&1