diff options
author | Luke Smith <luke@lukesmith.xyz> | 2020-11-19 09:20:37 -0500 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2020-11-19 09:20:37 -0500 |
commit | 50c197ac632a35f3d8d012596f872a7854475030 (patch) | |
tree | 59afef77f15407723ede0259917b0ecabe0beee0 /bin | |
parent | 9c467bf4d26648baca690d81dda978ed14170cfc (diff) |
attachment fix; documentation fixes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mw | 2 | ||||
-rwxr-xr-x | bin/openfile | 13 |
2 files changed, 8 insertions, 7 deletions
@@ -337,7 +337,7 @@ Options allowed with -a: -x Password for account (recommended to be in double quotes) -p Install for a Protonmail account. -o Configure address, but keep mail online. - -b Assume typical English mailboxes without attempting log-on. + -f Assume typical English mailboxes without attempting log-on. NOTE: Once at least one account is added, you can run \`mbsync -a\` to begin downloading mail. diff --git a/bin/openfile b/bin/openfile index f6668dc..cf3c6c3 100755 --- a/bin/openfile +++ b/bin/openfile @@ -1,9 +1,10 @@ #!/bin/sh # Helps open a file with xdg-open from mutt in a external program without weird side effects. -[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid xdg-open" -mkdir -p "/tmp/$USER-mutt-tmp" -file="/tmp/$USER-mutt-tmp/$(basename "$1")" -rm -f "$file" -cp "$1" "$file" -$opener "$file" >/dev/null 2>&1 & +tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files" +file="$tempdir/$(basename "$1")" +[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open" +mkdir -p "$tempdir" +cp -f "$1" "$file" +$opener "$file" >/dev/null 2>&1 +find "${tempdir:?}" -mtime +1 -type f -delete |