From 74fa46bd607cb9d8709bbf57677132a47ce47f35 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sat, 27 Jul 2024 15:23:31 -0400 Subject: [PATCH] mpvq: also allow links from argv --- src/.local/bin/mpvq | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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