dotfiles/scripts/prefix/bin/yt

19 lines
480 B
Text
Raw Normal View History

2016-03-25 12:28:57 +01:00
#!/bin/bash
2017-03-22 18:51:33 +01:00
#YoutubeBrowser="/usr/bin/google-chrome-stable"
YoutubeBrowser="/home/eeva/.nix-profile/bin/chromium-browser"
2016-03-25 12:28:57 +01:00
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