AutoYADM commit: 2025-03-17 13:15:07
This commit is contained in:
parent
e59a96b6e5
commit
ea9b3c08e4
3 changed files with 4 additions and 8 deletions
|
@ -200,7 +200,6 @@ v = :preview<Enter> # Preview message
|
||||||
dr = :postpone<Enter> # Postpone (save as Draft)
|
dr = :postpone<Enter> # Postpone (save as Draft)
|
||||||
q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
|
q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
|
||||||
e = :edit<Enter> # Edit (body and headers)
|
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
|
a = :menu -c 'footclient yazi --chooser-file %f' -b :attach<Enter> # Pick attachments with Yazi
|
||||||
dt = :detach<space> # Remove attachment
|
dt = :detach<space> # Remove attachment
|
||||||
H = :multipart text/html<Enter> # Convert Markdown to HTML
|
H = :multipart text/html<Enter> # Convert Markdown to HTML
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
# File to write the path
|
|
||||||
# temp="$1"
|
|
||||||
|
|
||||||
# if the clipboard is plain/text, we assume it's a path
|
# if the clipboard is plain/text, we assume it's a path
|
||||||
# otherwise, we assume it's a mime-type to be pasted
|
# otherwise, we assume it's a mime-type to be pasted
|
||||||
if wl-paste --list-types | grep -qv '^text/plain$'; then
|
if wl-paste --list-types | grep -qv '^text/plain$'; then
|
||||||
notify-send "Non-text type."
|
# clipboard contains a file
|
||||||
tempdir=$(mktemp -d)
|
tempdir=$(mktemp -d)
|
||||||
wl-paste >temp
|
wl-paste >temp
|
||||||
extension=$(grep -E "^$(wl-paste --list-types)" /etc/mime.types | awk '{print $2}')
|
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
|
esac
|
||||||
else
|
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
|
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
|
case "$confirm" in
|
||||||
y)
|
y)
|
||||||
|
@ -34,5 +32,4 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -2,9 +2,9 @@ Videos /home/fic/Videos/ v
|
||||||
Videos /home/fic/Videos v
|
Videos /home/fic/Videos v
|
||||||
SyncDocuments /home/fic/SyncDocuments/ s
|
SyncDocuments /home/fic/SyncDocuments/ s
|
||||||
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
|
||||||
|
Pictures /home/fic/Pictures p
|
||||||
Downloads /home/fic/Downloads D
|
Downloads /home/fic/Downloads D
|
||||||
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
|
||||||
|
Documents /home/fic/Documents/ d
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue