Adding yt command
This commit is contained in:
parent
34ebec0853
commit
2740e54296
1 changed files with 17 additions and 0 deletions
17
scripts/prefix/bin/yt
Executable file
17
scripts/prefix/bin/yt
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/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
|
||||
|
Loading…
Reference in a new issue