dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

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:
M.local/bin/linkhandler | 3++-
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")