added all scripts

This commit is contained in:
liph
2025-12-19 22:56:37 +00:00
parent 0a8de06bc3
commit 3992fb9464
12 changed files with 689 additions and 0 deletions

22
move-trash.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Read the message file path from aerc
while read -r filepath; do
# Get the base mail directory
maildir="$HOME/.local/share/mail"
# Extract the filename
filename=$(basename "$filepath")
# Create Trash/cur if it doesn't exist
mkdir -p "$maildir/Trash/cur"
# Move the file to Trash
if [[ -f "$filepath" ]]; then
mv "$filepath" "$maildir/Trash/cur/$filename"
echo "Moved to Trash: $filename" >&2
fi
done
# Re-index with notmuch
notmuch new >/dev/null 2>&1