diff options
Diffstat (limited to 'url_handler.sh')
-rwxr-xr-x | url_handler.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/url_handler.sh b/url_handler.sh index 5ae6c59..55d225c 100755 --- a/url_handler.sh +++ b/url_handler.sh @@ -83,6 +83,7 @@ handle_youtube() { # Main URL=$1 +[ -n "$URL" ] || URL=$(xclip -o) [ -n "$URL" ] || URL=$(get_url) [ -n "$URL" ] || exit echo "$URL" @@ -90,9 +91,9 @@ echo "$URL" case $URL in *youtube.com*) handle_youtube "$URL" ;; *youtu.be*) handle_youtube "$URL" ;; - *ytsearch:*) handle_youtube "$URL" ;; - *mailto*) mutt "$URL" ;; - *http?*) $BROWSER "$URL" ;; + ytsearch:*) handle_youtube "$URL" ;; + mailto*) mutt "$URL" ;; + http?*) $BROWSER "$URL" ;; *) $BROWSER --search "$URL" esac |