dotfiles/system/.local/bin/twitch.sh
Severin Kaderli 8d3f9c8a1d
More config cleanup
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
2019-02-13 00:47:10 +01:00

26 lines
439 B
Bash
Executable file

#!/bin/bash
#
# SCRIPT NAME:
# twitch.sh
#
# AUTHOR:
# Severin Kaderli <severin.kaderli@gmail.com>
#
# DESCRIPTION:
# This script loads a Twitch livestream in a local video player
# using streamlink.
#
# USAGE:
# ./twitch.sh USERNAME [RESOLUTION]
if [[ -z $1 ]]; then
echo "Please enter a username!"
exit 1
fi
if [[ -z $2 ]]; then
resolution="best"
else
resolution="${2}"
fi
streamlink "https://twitch.tv/${1}" "${resolution}"