dmenu-scripts/dmenulinkhandler
cronyakatsuki 19ee4a7871 Update.
2022-03-21 18:05:05 +01:00

12 lines
375 B
Bash
Executable File

#!/bin/sh
# Feed this script a link and it will give dmenu
# with some choice of programs to open the link with.
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
mpv) "$VIDEO" "$1" ;;
browser) "$BROWSER" "$1" > /dev/null;;
"copy url") echo "$1" | xclip -selection clipboard ;;
w3m) readable "$1" | w3m -T text/html ;;
esac