diff --git a/.config/aerc/binds.conf b/.config/aerc/binds.conf index 9acacac9..b6f15166 100644 --- a/.config/aerc/binds.conf +++ b/.config/aerc/binds.conf @@ -205,7 +205,7 @@ a = :menu -c 'footclient yazi --chooser-file %f' -b :attach # Pick attach dt = :detach # Remove attachment H = :multipart text/html # Convert Markdown to HTML # paste an attachment from clipboard -# p = :menu -c '' +p = :menu -c '/home/fic/.config/mail/aerc/paste-attachment.sh' :attach # Paste attachment [terminal] $noinherit = true diff --git a/.config/aerc/paste-attachment.sh b/.config/aerc/paste-attachment.sh index d7f8cc01..3c843c83 100755 --- a/.config/aerc/paste-attachment.sh +++ b/.config/aerc/paste-attachment.sh @@ -1,12 +1,18 @@ #!/bin/env bash # File to write the path -temp="$1" +# temp="$1" # if the clipboard is plain/text, we assume it's a path -# otherwise, we assume it's a mime-type to be copied +# otherwise, we assume it's a mime-type to be pasted if wl-paste --list-types | grep -qv '^text/plain$'; then - echo "Non-text type." + notify-send "Non-text type." + temp=$(mktemp) + wl-paste > temp + grep -E "^$(wl-paste --list-types)" /etc/mime.types | awk '{print $2}' + + # echo "$temp" else - echo "Text type." + notify-send "Text type." + wl-paste fi diff --git a/.config/aerc/temp b/.config/aerc/temp new file mode 100644 index 00000000..05fd0b4e Binary files /dev/null and b/.config/aerc/temp differ diff --git a/.config/yazi/bookmark b/.config/yazi/bookmark index d62df124..d57613ca 100644 --- a/.config/yazi/bookmark +++ b/.config/yazi/bookmark @@ -1,5 +1,5 @@ -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 Pictures /home/fic/Pictures p