diff --git a/dmenu-link-handler b/dmenu-link-handler index c4f6eff..000f21b 100755 --- a/dmenu-link-handler +++ b/dmenu-link-handler @@ -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