1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 19:09:03 -08:00

simple yt command and stuff

This commit is contained in:
Connor Olding 2016-03-12 09:32:57 -08:00
parent cccc73924c
commit dd31b74a17
2 changed files with 13 additions and 2 deletions

View file

@ -46,7 +46,7 @@ watchstream1() {
mpv $=REPLY "$url"
else
# bash syntax
mpv $=REPLY "$url"
mpv $REPLY "$url"
fi
}
@ -79,4 +79,15 @@ hitbox() {
watchstream "http://hitbox.tv/$user" "$@"
}
yt() {
local vid="$1"
# can't be bothered to use substrings since they differ across bash/zsh
if [[ "$(head -c4 <<< "$vid")" != "http" ]]; then
vid="https://www.youtube.com/watch?v=$vid"
fi
mpv --af=lavfi="[$_M_PROCESS]" \
--audio-samplerate=44100 --audio-format=s16 \
--ytdl-format=22,best "$vid"
}
_nn=

View file

@ -126,7 +126,7 @@ alias -g STFU="2>/dev/null"
for x in ack cd cp ebuild gcc gist grep ln man mkdir mv rm
alias $x="nocorrect $x"
for x in arith curl fc find ftp history let locate rsync scp sftp wget
for x in arith curl fc find ftp history let locate rsync scp sftp wget twitch hitbox yt
alias $x="noglob $x"
if [[ "$TERM" = xterm* ]]; then