2021-03-13 18:09:41 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Feed this script a link and it will give dmenu
|
2021-07-06 15:12:27 +02:00
|
|
|
# with some choice of programs to open the link with.
|
2021-03-13 18:09:41 +01:00
|
|
|
|
|
|
|
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
|
2021-07-06 15:12:27 +02:00
|
|
|
mpv) "$VIDEO" "$1" ;;
|
2021-03-13 18:09:41 +01:00
|
|
|
browser) "$BROWSER" "$1" > /dev/null;;
|
|
|
|
"copy url") echo "$1" | xclip -selection clipboard ;;
|
2022-03-21 18:05:05 +01:00
|
|
|
w3m) readable "$1" | w3m -T text/html ;;
|
2021-03-13 18:09:41 +01:00
|
|
|
esac
|