commit bcb021d53913bfdfe74152769516a50a558561f2
parent f707ca4df8dca93e06c40e6878af290b803d3f34
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Wed, 8 Jan 2020 10:27:48 +0100
Delete downloaded files 2 min after opening, open gopher URIs with sacc
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.local/bin/linkhandler b/.local/bin/linkhandler
@@ -37,6 +37,9 @@ handle_url() {
url="https://doi.org/$url"
notify-send "${0##*/}" "open as doi"
action="open" ;;
+ gopher://*)
+ nohup $TERMINAL sacc "$url" &
+ ;;
*)
action="$(printf "open\nopen (tbb)\nxclip\nducksearch\nmap\nbookmark\ndownload\nhtml to pdf\nsci-hub\nscholarref\nmpv\nxdg-open\nyoutube-dl\nyoutube-dl-music\ndefine" | \
dmenu -i -p "$(echo "$url" | sed 's/.*:\/\///' | cut -c-80)")";;
@@ -82,7 +85,7 @@ handle_url() {
"xdg-open")
f="$(curl -s --write-out "%{filename_effective}\n" -OL "$url")"
nohup xdg-open "$f" >/dev/null 2>&1 &
- sleep 1; rm "$f" ;;
+ sleep 120; rm "$f" ;;
"youtube-dl")
echo "youtube-dl '$url' >/dev/null" | at now;;
"youtube-dl-music")