Run program in detached from terminal, and have mpv no video option.

This commit is contained in:
CronyAkatsuki 2022-12-12 20:12:16 +01:00
parent 1a11ee39f2
commit 600a71428e

View File

@ -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 ;;