Added wayland support.

This commit is contained in:
cronyakatsuki 2022-10-23 21:54:23 +02:00
parent 52d02d84b0
commit 2b54422aed

View File

@ -5,11 +5,10 @@
source $HOME/.config/dmenu/config
[ -z "$@" ] && link=$(xclip -o) || link="$@"
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | $DMENU -p "Open link with what program?")" in
mpv) "$VIDEO" "$link" ;;
browser) "$BROWSER" "$link" > /dev/null;;
"copy url") echo "$link" | xclip -selection clipboard ;;
w3m) readable "$link" | w3m -T text/html ;;
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 ;;
esac