mpvq: also allow links from argv

This commit is contained in:
dogeystamp 2024-07-27 15:23:31 -04:00
parent 842951379a
commit 74fa46bd60
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

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