updated scripts

This commit is contained in:
liph
2026-04-30 13:13:42 +00:00
parent 3992fb9464
commit fd8e28ed14
60 changed files with 2770 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Get the current message's notmuch ID from aerc's environment
# We'll use notmuch to find and move the file
maildir="$HOME/.local/share/mail"
# Find files for messages in current thread that aren't already in Trash
notmuch search --output=files thread:{} 2>/dev/null | while read filepath; do
# Skip if already in Trash
if [[ "$filepath" == *"/Trash/"* ]]; then
continue
fi
if [[ -f "$filepath" ]]; then
filename=$(basename "$filepath")
mkdir -p "$maildir/Trash/cur"
mv "$filepath" "$maildir/Trash/cur/$filename"
fi
done
# Re-index
notmuch new >/dev/null 2>&1