.config
.emacs.d
.gkrellm2
.local
bin
Chatty
Checking-repo
Logc
Logs
Update
Update-kernel
WinBox
backupSynology
backupSynologyMac
bin-cp
browser-x
chardetect
chatty-run
cleaner
cleanertmp
cmus-control
cmus-shell
cpumhz
debugger
dmenumount
dmenuumount
dmenuunicode
docker-start
dwmstatusbar
eix-repos-sync
epylint
euscan
ext
f2py
f2py3
f2py3.6
f2py3.7
f2py3.8
flask
futurize
gentoo-test
geoip
get-meraki-network-list
getforecast
gfetch
gfg
git-delete-branch
git-init-folder
haruhi-dl
iptables-restart
iptables-update
isort
jupyter-note
mailsync
minecraft-launcher
mouse-set
night
notify-program
password-manager
pasteurize
pwiz.py
pylint
pyreverse
rasp
rcon
record
remove-kernel
runJava
saver-off
sb-battery
sb-clock
sb-cpu
sb-mail
sb-mem
sb-music
sb-network
sb-temp
sb-volume
sb-weather
screen-switcher
screenshot
screenshot-area
set-wallpaper
shut-sup-rest
speedtest-cli
ssh-permissions
stream
suspend-at-time
symilar
tea
temp
term-wmi
terraform-ls
tester-ebuild
tester-ubuntu
tmux-display-fix
trans
twitch
video-convert
volume
welcomer
welcomer-serwer
wheel
wsl-notify
wylaczoff
yatqa
youtube-dl
yt-mp3
yt-video
Library
.alacritty.yml
.gitignore
.markdownlint.json
.signature
.skhdrc
.tmux.conf
.vimrc
.vimrc-def
.wall.jpg
.xinitrc
.yabairc
.zshrc
23 lines
854 B
Bash
Executable File
23 lines
854 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CLIENT_ID=SET_CLIENT_ID_HERE
|
|
OAUTH_TOKEN=SET_OAUTH_TOKEN_HERE
|
|
|
|
if [ -z "$1" ]; then
|
|
curl -s \
|
|
-H 'Accept: application/vnd.twitchtv.v5+json' \
|
|
-H "Client-ID: ${TWITCH_CLIENT_ID:-$CLIENT_ID}" \
|
|
-H "Authorization: OAuth ${TWITCH_OAUTH_TOKEN:-$OAUTH_TOKEN}" \
|
|
-X GET 'https://api.twitch.tv/kraken/streams/followed' | \
|
|
ramda \
|
|
'tap (res) -> if res.error then console.error(res); process.exit(1)' \
|
|
'.streams' \
|
|
'map pick-dot-paths [\channel.name, \channel.status, \game, \viewers]' \
|
|
'map flat' \
|
|
'map (rename-keys-by split(".") >> last)' \
|
|
'-> if is-empty(it) then "No one you are following is streaming right now." else it' \
|
|
-o table
|
|
else
|
|
__NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 __GLX_VENDOR_LIBRARY_NAME=nvidia __GL_SYNC_TO_VBLANK=0 streamlink -p mpv twitch.tv/$1 ${2:-best}
|
|
fi
|