summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mw2
-rwxr-xr-xbin/openfile13
2 files changed, 8 insertions, 7 deletions
diff --git a/bin/mw b/bin/mw
index af4d785..9385bf5 100755
--- a/bin/mw
+++ b/bin/mw
@@ -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