diff options
author | rafa_99 <raroma09@gmail.com> | 2021-09-11 23:15:42 +0100 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2021-09-11 23:15:42 +0100 |
commit | 19b6b1a94e68411c7523cd55747415ca1add1173 (patch) | |
tree | f7e4b089232c7eee2272e30b28dd76ea946608d6 /scripts | |
parent | 14f71b31679917f1b95d978c7546e850288a1200 (diff) |
Fixed Up YT Script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/.local/bin/yt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/.local/bin/yt b/scripts/.local/bin/yt index 62e2a62..42e4732 100755 --- a/scripts/.local/bin/yt +++ b/scripts/.local/bin/yt @@ -1,3 +1,7 @@ #!/bin/sh -echo "<-" | dmenu -p "Youtube:" | xargs -I {} queryt -s "{}" | sed "s:\t: :g" | dmenu -l 10 -p "Video: " | awk '{print $1}' | xargs -I {} mpv --ytdl-format=22 "https://youtube.com/watch?v={}" +VIDEO="https://www.youtube.com/watch?v=$(echo "<-" | dmenu -p "Youtube:" | xargs -I {} queryt -s "{}" | sed "s:\t: :g" | dmenu -l 10 -p "Video: " | awk '{print $1}')" + +if [ "$VIDEO" != "" ]; then + mpv --ytdl-format=22 "$VIDEO" +fi |