dotfiles/scripts/prefix/bin/yt
2016-03-25 12:28:57 +01:00

17 lines
417 B
Bash
Executable file

#!/bin/bash
YoutubeBrowser="/usr/bin/google-chrome-stable"
BaseSearchUrl=" --incognito https://www.youtube.com/results?search_query="
BaseUrl="https://www.youtube.com/feed/subscriptions"
# Any args?
if [[ -n "$@" ]]
then
# Concat 'em
SearchTerm=$(echo "$@" | sed 's/ /+/g')
# Search on youtube privately
$YoutubeBrowser $BaseSearchUrl$SearchTerm
else
# Open my subscriptions
$YoutubeBrowser $BaseUrl
fi