AutoYADM commit: 2025-03-17 13:15:07

This commit is contained in:
Daniel Fichtinger 2025-03-17 13:15:07 -04:00
parent e59a96b6e5
commit ea9b3c08e4
3 changed files with 4 additions and 8 deletions

View file

@ -200,7 +200,6 @@ v = :preview<Enter> # Preview message
dr = :postpone<Enter> # Postpone (save as Draft)
q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
e = :edit<Enter> # Edit (body and headers)
# a = :attach -m<Enter> # Add attachment
a = :menu -c 'footclient yazi --chooser-file %f' -b :attach<Enter> # Pick attachments with Yazi
dt = :detach<space> # Remove attachment
H = :multipart text/html<Enter> # Convert Markdown to HTML

View file

@ -1,12 +1,9 @@
#!/bin/env bash
# File to write the path
# temp="$1"
# if the clipboard is plain/text, we assume it's a path
# otherwise, we assume it's a mime-type to be pasted
if wl-paste --list-types | grep -qv '^text/plain$'; then
notify-send "Non-text type."
# clipboard contains a file
tempdir=$(mktemp -d)
wl-paste >temp
extension=$(grep -E "^$(wl-paste --list-types)" /etc/mime.types | awk '{print $2}')
@ -25,6 +22,7 @@ if wl-paste --list-types | grep -qv '^text/plain$'; then
;;
esac
else
# clipboard contains a string (treat as path)
read -r -p "$(echo -n "Your clipboard contains $(wl-paste), which will be attached as a file path. Confirm (y/n): " >&2)" confirm
case "$confirm" in
y)
@ -34,5 +32,4 @@ else
exit 1
;;
esac
fi

View file

@ -2,9 +2,9 @@ Videos /home/fic/Videos/ v
Videos /home/fic/Videos v
SyncDocuments /home/fic/SyncDocuments/ s
SyncDocuments /home/fic/SyncDocuments s
Pictures /home/fic/Pictures p
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
Documents /home/fic/Documents d
Documents /home/fic/Documents/ d