From 94b3b6e701e2663d0ab5ecbda338899902390ce4 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 17 Mar 2025 18:15:15 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-17 18:15:15 --- .config/mail/mail-sync.sh | 3 --- .config/mail/mail-sync.sh##hostname.dpad | 30 ++++++++++++++++++++++++ .config/yazi/bookmark | 6 ++--- 3 files changed, 33 insertions(+), 6 deletions(-) delete mode 100755 .config/mail/mail-sync.sh create mode 100755 .config/mail/mail-sync.sh##hostname.dpad diff --git a/.config/mail/mail-sync.sh b/.config/mail/mail-sync.sh deleted file mode 100755 index e84f0272..00000000 --- a/.config/mail/mail-sync.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/env bash - -echo "Hello, World!" diff --git a/.config/mail/mail-sync.sh##hostname.dpad b/.config/mail/mail-sync.sh##hostname.dpad new file mode 100755 index 00000000..dff2bd86 --- /dev/null +++ b/.config/mail/mail-sync.sh##hostname.dpad @@ -0,0 +1,30 @@ +#!/bin/sh + +PIPE="/tmp/email_refresh_pipe" + +# Create pipe if doesn't exist +[ -p "$PIPE" ] || mkfifo "$PIPE" + +MBSYNC=$(pgrep mbsync) +NOTMUCH=$(pgrep notmuch) +MUCHSYNC=$(pgrep muchsync) + +if [ -n "$MBSYNC" -o -n "$NOTMUCH" -o -n "$MUCHSYNC" ]; then + echo "Already running one instance of mbsync or notmuch or muchsync. Exiting..." + exit 0 +fi + +# echo "Deleting messages tagged as *deleted*" +# notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm -v + +# sync mailbox with external servers +mbsync -Va +muchsync dbox +# apply tag:new to new mail +notmuch new +# new mail tagging pipeline +afew --tag --new +# signal waybar indicator update +echo "refresh" > "$PIPE" +# generate new ranked addressbook +maildir-rank-addr diff --git a/.config/yazi/bookmark b/.config/yazi/bookmark index 49684b12..bf39f875 100644 --- a/.config/yazi/bookmark +++ b/.config/yazi/bookmark @@ -1,9 +1,9 @@ -Videos /home/fic/Videos v Videos /home/fic/Videos/ v -SyncDocuments /home/fic/SyncDocuments s +Videos /home/fic/Videos v SyncDocuments /home/fic/SyncDocuments/ s -Pictures /home/fic/Pictures p +SyncDocuments /home/fic/SyncDocuments s Pictures /home/fic/Pictures/ p +Pictures /home/fic/Pictures p Downloads /home/fic/Downloads D Downloads /home/fic/Downloads/ D Documents /home/fic/Documents d