summaryrefslogtreecommitdiff
path: root/yt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'yt.sh')
-rwxr-xr-xyt.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt.sh b/yt.sh
index 823bb7c..a1c8261 100755
--- a/yt.sh
+++ b/yt.sh
@@ -47,9 +47,9 @@ prompt_url() {
## Grab url from clipboard/primary selection, else get via prompt
grab_url() {
- if url=$(grab_url_stdin) && check_if_youtube $url; then
- elif url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then
+ if url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then
elif url=$(xclip -o 2>/dev/null || echo) && check_if_youtube $url; then
+ elif url=$(grab_url_stdin) && check_if_youtube $url; then
elif url=$(prompt_url) && check_if_youtube $url; then
else
exit $NO_YOUTUBE_URL
@@ -109,7 +109,7 @@ download_audio() {
play_video() {
url="$1"
notify-send "Playing video..." "$(get_info $url)" &
- mpv --no-terminal $url &
+ mpv --no-terminal --geometry=25%-10-40 --title=yt.sh $url &
}
@@ -117,7 +117,7 @@ play_video() {
play_audio() {
url="$1"
notify-send "Playing audio..." "$(get_info $url)" &
- $TERMINAL -e mpv --no-video $url &
+ $TERMINAL -t yt.sh -e mpv --no-video $url &
}