2022-04-05 16:59:13 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Feed this script a link or it will get it from your clipboard and it will give dmenu
|
|
|
|
# with some choice of programs to open the link with.
|
|
|
|
|
2022-07-09 19:13:31 +02:00
|
|
|
source $HOME/.config/dmenu/config
|
|
|
|
|
2022-10-23 21:54:23 +02:00
|
|
|
case "$(printf "mpv\\nbrowser\\ncopy url [X11]\\ncopy url [Wayland]\\nw3m" | $DMENU -p "Open link with what program?")" in
|
|
|
|
mpv) "$VIDEO" "$@" ;;
|
|
|
|
browser) "$BROWSER" "$@" > /dev/null;;
|
|
|
|
"copy url [X11]") echo "$@" | xclip -selection clipboard ;;
|
|
|
|
"copy url [Wayland]") echo "$@" | wl-copy -n ;;
|
|
|
|
w3m) readable "$@" | w3m -T text/html ;;
|
2022-04-05 16:59:13 +02:00
|
|
|
esac
|