Adds basic image support to link handler

master
Jonathan Hodgson 3 years ago
parent 6c6508aab5
commit 838d34e842
  1. 6
      bin/.bin/linkhandler

@ -12,6 +12,12 @@ case "$url" in
*"//invidious.*/"*) yt --url "$url"; exit 0 ;;
*//*.youtube.*/*) yt --url "$url"; exit 0 ;;
*"//videos.*"*) yt --url "$url"; exit 0 ;;
*.png|*.jpg)
tmp="$(mktemp)"
curl -s -o "$tmp" --user-agent blar "$url"
sxiv "$tmp"
rm "$tmp"
;;
*"//xkcd.com/"*) xkcd "$url"; exit 0 ;;
"mailto:"*) neomutt "$url"; exit 0 ;;
*) $browser "$url"; exit 0 ;;

Loading…
Cancel
Save