diff --git a/src/.local/bin/mpvq b/src/.local/bin/mpvq index 97b59c0..69edc6e 100755 --- a/src/.local/bin/mpvq +++ b/src/.local/bin/mpvq @@ -1,5 +1,10 @@ #!/bin/sh -# Append link from clipboard to mpv playlist +# Append link from clipboard/argument to mpv playlist + +if [ -z "$2" ]; then + path="$(xsel -b)" +else + path="$2" +fi -path="$(xsel -b)" echo "{ command: [ \"loadfile\", \"$path\", \"append-play\" ] }" | socat - $1