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
# 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

View file

@ -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

View file

@ -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

View file

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

View file

@ -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