From 600a71428e32c5cc3a9922b9ef227cb825ad3c58 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 12 Dec 2022 20:12:16 +0100 Subject: [PATCH] Run program in detached from terminal, and have mpv no video option. --- dmenu-link-handler | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dmenu-link-handler b/dmenu-link-handler index bb36723..e5e5432 100755 --- a/dmenu-link-handler +++ b/dmenu-link-handler @@ -8,9 +8,10 @@ load_config () { } menu () { - 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;; + case "$(printf "mpv\\nmpv audio\\nbrowser\\ncopy url [X11]\\ncopy url [Wayland]\\nw3m" | $DMENU -p "Open link with what program?")" in + mpv) start-program "$VIDEO" "$@" ;; + "mpv audio") "$VIDEO" "$@" --no-video ;; + browser) start-program "$BROWSER" "$@" ;; "copy url [X11]") echo "$@" | xclip -selection clipboard ;; "copy url [Wayland]") echo "$@" | wl-copy -n ;; w3m) readable "$@" | w3m -T text/html ;;