From 2740e5429638b55fd4d12e21f6399901b87f75f0 Mon Sep 17 00:00:00 2001 From: Martin Potier Date: Fri, 25 Mar 2016 12:28:57 +0100 Subject: [PATCH] Adding yt command --- scripts/prefix/bin/yt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/prefix/bin/yt diff --git a/scripts/prefix/bin/yt b/scripts/prefix/bin/yt new file mode 100755 index 0000000..f833f63 --- /dev/null +++ b/scripts/prefix/bin/yt @@ -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 +