From f03d12c69c593f14fb9bbf1154e5d55996e827d3 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Mon, 17 Mar 2025 23:15:07 -0400 Subject: [PATCH] AutoYADM commit: 2025-03-17 23:15:07 --- .config/aerc/paste-attachment.sh | 8 ++++++-- .config/mail/async-mail.sh | 6 +++--- .config/mail/mail-indicator.sh | 13 +++++++------ .config/yazi/.gitignore | 1 + .config/yazi/bookmark | 5 ----- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.config/aerc/paste-attachment.sh b/.config/aerc/paste-attachment.sh index 6aaf02d8..3715edc2 100755 --- a/.config/aerc/paste-attachment.sh +++ b/.config/aerc/paste-attachment.sh @@ -2,11 +2,12 @@ # 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 +TYPE=$(wl-paste --list-types) +if "$TYPE" | grep -qv '^text/plain$'; then # clipboard contains a file tempdir=$(mktemp -d) 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 # read -r 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 ;; esac +elif "$TYPE" | grep -q '^text/uri-list$' && "$TYPE" | grep -q '^file://'; then + # convert URI into standard path + echo "hola" 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 diff --git a/.config/mail/async-mail.sh b/.config/mail/async-mail.sh index e7d9ae98..219d5bc0 100755 --- a/.config/mail/async-mail.sh +++ b/.config/mail/async-mail.sh @@ -1,5 +1,5 @@ #!/bin/env bash -/home/fic/.config/mail/mail-sync.sh & -# nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 & -# exit 0 +# exec /home/fic/.config/mail/mail-sync.sh & +nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 & +exit 0 diff --git a/.config/mail/mail-indicator.sh b/.config/mail/mail-indicator.sh index 7e96fe00..a4f76514 100755 --- a/.config/mail/mail-indicator.sh +++ b/.config/mail/mail-indicator.sh @@ -13,16 +13,17 @@ PIPE="/tmp/email_refresh_pipe" # fi # mailboxes to monitor -MAILBOXES=("personal" "school") +# MAILBOXES=("personal" "school") # Get unread counts and format for waybar get_unread_counts() { - for mailbox in "${MAILBOXES[@]}"; do - count=$(notmuch count --output=messages "tag:unread and path:$mailbox/**") - printf "%s: %s " "$mailbox" "$count" - done + # for mailbox in "${MAILBOXES[@]}"; do + pcount=$(notmuch count --output=messages "tag:unread and path:personal/**") + scount=$(notmuch count --output=messages "tag:unread and path:school/**") + # printf "%s: %s " "$mailbox" "$count" + # done # we print a newline to let waybar know to display # what we just printed - printf "|\n" + echo "p: $pcount s: $scount |" } # run once for initial output diff --git a/.config/yazi/.gitignore b/.config/yazi/.gitignore index 43711bea..9389a27b 100644 --- a/.config/yazi/.gitignore +++ b/.config/yazi/.gitignore @@ -1,3 +1,4 @@ flavors/ plugins/ !plugins/symlink.yazi +bookmark diff --git a/.config/yazi/bookmark b/.config/yazi/bookmark index 2e73b6e9..681cf2c6 100644 --- a/.config/yazi/bookmark +++ b/.config/yazi/bookmark @@ -1,10 +1,5 @@ -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 -Downloads /home/fic/Downloads D Downloads /home/fic/Downloads/ D Documents /home/fic/Documents/ d -Documents /home/fic/Documents d