Skip to content

Instantly share code, notes, and snippets.

@Youka
Last active March 31, 2016 18:05
Show Gist options
  • Select an option

  • Save Youka/6496480d4c1e2c72f3bb to your computer and use it in GitHub Desktop.

Select an option

Save Youka/6496480d4c1e2c72f3bb to your computer and use it in GitHub Desktop.
Start Twitch stream (with Livestreamer) + chat (with Firefox) after simple channel input
#!/bin/bash
# Ask user for channel
read -p "Enter Twitch channel name: " channel
# Channel name to lowercase
channel=${channel,,}
# Open Twitch chat
read -p "Open chat (y/n): " open_chat
if [ "$open_chat" = "y" ]
then
firefox -new-window "twitch.tv/"$channel"/chat" &
fi
# Open Twitch stream
livestreamer --player "vlc --qt-minimal-view" twitch.tv/$channel best
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment