dmenu-scripts/dmenulinkhandler

12 lines
333 B
Plaintext
Raw Normal View History

2021-03-13 18:09:41 +01:00
#!/bin/sh
# Feed this script a link and it will give dmenu
# some choice programs to use to open it.
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
2021-05-20 14:41:48 +02:00
mpv) mpv "$1" ;;
2021-03-13 18:09:41 +01:00
browser) "$BROWSER" "$1" > /dev/null;;
"copy url") echo "$1" | xclip -selection clipboard ;;
w3m) w3m "$1";;
esac