From a0bb023d782dd2d8703670d560b5ccd8d25d640e Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 4 Nov 2021 12:25:04 +0300 Subject: bins: shfmt, weasel suite, spark --- .local/bin/openfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.local/bin/openfile') diff --git a/.local/bin/openfile b/.local/bin/openfile index cf3c6c3..742b9c0 100755 --- a/.local/bin/openfile +++ b/.local/bin/openfile @@ -1,10 +1,10 @@ #!/bin/sh # Helps open a file with xdg-open from mutt in a external program without weird side effects. -tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files" +tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt/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 +$opener "$file" > /dev/null 2>&1 find "${tempdir:?}" -mtime +1 -type f -delete -- cgit v1.2.3-70-g09d2