commit 64f5876ffec5913f2ee33361814303863de6dbc0
parent 06dae60b67eda78629af519496937f1cfbe30728
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 3 Oct 2019 12:12:11 +0200
Remove downloaded files after opening
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
@@ -49,7 +49,8 @@ handle_url() {
nohup mpv -quiet "$1" >/dev/null 2>&1 & ;;
"xdg-open")
f="$(curl -s --write-out "%{filename_effective}\n" -OL "$1")"
- nohup xdg-open "$f" >/dev/null 2>&1 & ;;
+ nohup xdg-open "$f" >/dev/null 2>&1 &
+ sleep 1; rm "$f" ;;
"youtube-dl")
echo "youtube-dl -f 'best[height<=1080]+bestaudio' '$1' >/dev/null" | at now;;
"youtube-dl-music")