diff --git a/.config/aerc/paste-attachment.sh b/.config/aerc/paste-attachment.sh index 3c843c83..164669e0 100755 --- a/.config/aerc/paste-attachment.sh +++ b/.config/aerc/paste-attachment.sh @@ -6,13 +6,33 @@ # 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." - temp=$(mktemp) - wl-paste > temp - grep -E "^$(wl-paste --list-types)" /etc/mime.types | awk '{print $2}' - - # echo "$temp" + notify-send "Non-text type." + tempdir=$(mktemp -d) + wl-paste >temp + extension=$(grep -E "^$(wl-paste --list-types)" /etc/mime.types | awk '{print $2}') + # echo -n "File name: " >&2 + # read -r user_input + read -r -p "$(echo -n "Enter file name (extension .$extension will be appended): " >&2)" user_input + attachment="$tempdir/$user_input.$extension" + read -r -p "$(echo -n "Your file will be written to $attachment and attached. Confirm (y/n): " >&2)" confirm + case "$confirm" in + y) + wl-paste >"$attachment" + echo "$attachment" + ;; + *) + exit 1 + ;; + esac else - notify-send "Text type." + 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) wl-paste + ;; + *) + exit 1 + ;; + esac + fi diff --git a/.config/yazi/bookmark b/.config/yazi/bookmark index d57613ca..dcfa0114 100644 --- a/.config/yazi/bookmark +++ b/.config/yazi/bookmark @@ -1,10 +1,10 @@ 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 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 +Downloads /home/fic/Downloads/ D Documents /home/fic/Documents/ d +Documents /home/fic/Documents d