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

This commit is contained in:
Daniel Fichtinger 2025-03-17 23:15:07 -04:00
parent f5b3ffcde5
commit f03d12c69c
5 changed files with 17 additions and 16 deletions

View file

@ -2,11 +2,12 @@
# 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 TYPE=$(wl-paste --list-types)
if "$TYPE" | grep -qv '^text/plain$'; then
# clipboard contains a file # 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 "^$TYPE" /etc/mime.types | awk '{print $2}')
# echo -n "File name: " >&2 # echo -n "File name: " >&2
# read -r user_input # read -r user_input
read -r -p "$(echo -n "Enter file name (extension .$extension will be appended): " >&2)" user_input read -r -p "$(echo -n "Enter file name (extension .$extension will be appended): " >&2)" user_input
@ -21,6 +22,9 @@ if wl-paste --list-types | grep -qv '^text/plain$'; then
exit 1 exit 1
;; ;;
esac esac
elif "$TYPE" | grep -q '^text/uri-list$' && "$TYPE" | grep -q '^file://'; then
# convert URI into standard path
echo "hola"
else else
# clipboard contains a string (treat as path) # 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

View file

@ -1,5 +1,5 @@
#!/bin/env bash #!/bin/env bash
/home/fic/.config/mail/mail-sync.sh & # exec /home/fic/.config/mail/mail-sync.sh &
# nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 & nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 &
# exit 0 exit 0

View file

@ -13,16 +13,17 @@ PIPE="/tmp/email_refresh_pipe"
# fi # fi
# mailboxes to monitor # mailboxes to monitor
MAILBOXES=("personal" "school") # MAILBOXES=("personal" "school")
# Get unread counts and format for waybar # Get unread counts and format for waybar
get_unread_counts() { get_unread_counts() {
for mailbox in "${MAILBOXES[@]}"; do # for mailbox in "${MAILBOXES[@]}"; do
count=$(notmuch count --output=messages "tag:unread and path:$mailbox/**") pcount=$(notmuch count --output=messages "tag:unread and path:personal/**")
printf "%s: %s " "$mailbox" "$count" scount=$(notmuch count --output=messages "tag:unread and path:school/**")
done # printf "%s: %s " "$mailbox" "$count"
# done
# we print a newline to let waybar know to display # we print a newline to let waybar know to display
# what we just printed # what we just printed
printf "|\n" echo "p: $pcount s: $scount |"
} }
# run once for initial output # run once for initial output

View file

@ -1,3 +1,4 @@
flavors/ flavors/
plugins/ plugins/
!plugins/symlink.yazi !plugins/symlink.yazi
bookmark

View file

@ -1,10 +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
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 Downloads /home/fic/Downloads/ D
Documents /home/fic/Documents/ d Documents /home/fic/Documents/ d
Documents /home/fic/Documents d