Skip to content

Commit 5bc947d

Browse files
committed
Scripts: Play video from clipboard
1 parent 94f59f5 commit 5bc947d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.local/bin/play

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# Depends: GNU getopt, mpv, socat, streamlink
3+
# Depends: GNU getopt, mpv, socat, streamlink, xclip
44

55
SOCK="/tmp/umpv-fifo"
66

@@ -256,7 +256,11 @@ elif [ $shuffleOption -eq 1 ]; then
256256
elif [ $queueOption -eq 1 ]; then
257257
queue "$*"
258258
else
259-
for url in "$@"; do
260-
play "$url"
261-
done
259+
if [ "$*" = "" ]; then
260+
play "$(xclip -o)"
261+
else
262+
for url in "$@"; do
263+
play "$url"
264+
done
265+
fi
262266
fi

0 commit comments

Comments
 (0)