mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
cygwin crap
This commit is contained in:
parent
5b0a96372b
commit
e4a1769dfc
4 changed files with 68 additions and 43 deletions
50
home/-shrc
50
home/-shrc
|
@ -5,6 +5,9 @@
|
||||||
umask 022 # don't inherit last umask. pip will break itself.
|
umask 022 # don't inherit last umask. pip will break itself.
|
||||||
|
|
||||||
hash -d e=/media/2tb/you
|
hash -d e=/media/2tb/you
|
||||||
|
hash -d c=/cygdrive/c
|
||||||
|
hash -d win=/cygdrive/c/Users/$USER
|
||||||
|
hash -d mm='/cygdrive/c/Program Files (x86)/mupen64plus/mm'
|
||||||
|
|
||||||
ADDPATH() {
|
ADDPATH() {
|
||||||
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"
|
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"
|
||||||
|
@ -46,10 +49,10 @@ done
|
||||||
export PREFIX="$HOME/opt/local"
|
export PREFIX="$HOME/opt/local"
|
||||||
export CC="$(has clang || has clang-3.6 || has gcc)"
|
export CC="$(has clang || has clang-3.6 || has gcc)"
|
||||||
export CXX="$(has clang++ || has clang++-3.6 || has g++)"
|
export CXX="$(has clang++ || has clang++-3.6 || has g++)"
|
||||||
export CFLAGS='-march=native -O2'
|
#export CFLAGS='-march=native -O2'
|
||||||
export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
|
#export LDFLAGS='-Wl,-O1,--sort-common,-z,relro'
|
||||||
export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
|
#export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'"
|
||||||
export LDFLAGS="$LDFLAGS -L'$HOME/opt/local/lib'"
|
#export LDFLAGS="$LDFLAGS -L'$HOME/opt/local/lib'"
|
||||||
export CXXFLAGS="$CFLAGS"
|
export CXXFLAGS="$CFLAGS"
|
||||||
export LD_LIBRARY_PATH= # -n isn't an option in zsh's export
|
export LD_LIBRARY_PATH= # -n isn't an option in zsh's export
|
||||||
export MAKEFLAGS="-j2"
|
export MAKEFLAGS="-j2"
|
||||||
|
@ -114,41 +117,4 @@ function trash() {
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -e ~/sh/z/z.sh ] && . ~/sh/z/z.sh
|
[ -e ~/sh/z/z.sh ] && . ~/sh/z/z.sh
|
||||||
|
. ~/.streamcrap
|
||||||
# awful things
|
|
||||||
# i should really write a ladspa plugin that does this all at once and
|
|
||||||
# with attack/release smoothing so aliasing doesn't go through the roof!
|
|
||||||
_M_STEREO='aformat=channel_layouts=stereo'
|
|
||||||
_M_PRE_EMPH='equalizer=f=50.0:g=-10:width_type=o:w=4,equalizer=f=5000:g=+05:width_type=o:w=4'
|
|
||||||
_M_POST_EMPH='equalizer=f=50.0:g=+10:width_type=o:w=4,equalizer=f=5000:g=-05:width_type=o:w=4'
|
|
||||||
_M_COMPRESS='compand=0.001|0.001:0.25|0.25:-42/-42|0/-21:6:18:-30:0.001'
|
|
||||||
_M_LIMIT='compand=0.000|0.000:0.10|0.10:-9/-9|0/-6.:3:4.5:-9'
|
|
||||||
_M_KILL="$_M_STEREO,$_M_PRE_EMPH,$_M_COMPRESS,$_M_POST_EMPH"
|
|
||||||
|
|
||||||
crap_speakers='crap_eq_const_T420'
|
|
||||||
[ -e "/usr/lib/ladspa/${crap_speakers}.so" ] \
|
|
||||||
&& _M_SPEAKERS="ladspa=file=${crap_speakers}.so:label=$crap_speakers"
|
|
||||||
|
|
||||||
if [[ "$(uname -n)" != "banshee" ]]; then
|
|
||||||
MPV_STREAM_FLAGS="--quiet --no-sub --vo=opengl:swapinterval=0"
|
|
||||||
else
|
|
||||||
MPV_STREAM_FLAGS="--quiet --no-sub --af=lavfi=[$_M_KILL],$_M_SPEAKERS,lavfi=[$_M_LIMIT]"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LIVESTREAMER_FLAGS=""
|
|
||||||
|
|
||||||
twitch(){
|
|
||||||
local stream="$1"
|
|
||||||
shift
|
|
||||||
# TODO: fix all the shit
|
|
||||||
livestreamer "twitch.tv/$stream" best "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
|
||||||
"$MPV_STREAM_FLAGS ${2:+--autofit=}${2:-} {filename}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# hitbox uses rtmp but mpv doesnt support rtmp dump parameters
|
|
||||||
hitbox(){
|
|
||||||
local stream="$1"
|
|
||||||
shift
|
|
||||||
livestreamer "hitbox.tv/$stream" best "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
|
||||||
"$MPV_STREAM_FLAGS ${2:+--autofit=}${2:-} {filename}"
|
|
||||||
}
|
|
||||||
|
|
51
home/streamcrap
Normal file
51
home/streamcrap
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
# awful things
|
||||||
|
|
||||||
|
MPV_STREAM_FLAGS="--quiet --no-sub --no-ytdl --loop=force --cache-initial=1024"
|
||||||
|
LIVESTREAMER_FLAGS=""
|
||||||
|
|
||||||
|
_M_STEREO='aformat=channel_layouts=stereo'
|
||||||
|
_M_PRE_EMPH='equalizer=f=50.0:g=-10:width_type=o:w=4,equalizer=f=5000:g=+05:width_type=o:w=4'
|
||||||
|
_M_POST_EMPH='equalizer=f=50.0:g=+10:width_type=o:w=4,equalizer=f=5000:g=-05:width_type=o:w=4'
|
||||||
|
_M_COMPRESS='compand=0.001|0.001:0.25|0.25:-42/-42|0/-21:6:18:-30:0.001'
|
||||||
|
_M_LIMIT='compand=0.000|0.000:0.10|0.10:-9/-9|0/-6.:3:4.5:-9'
|
||||||
|
_M_KILL="$_M_STEREO,$_M_PRE_EMPH,$_M_COMPRESS,$_M_POST_EMPH"
|
||||||
|
|
||||||
|
getladspa() {
|
||||||
|
REPLY=""
|
||||||
|
if [ -e "/usr/lib/ladspa/${1}.so" ]; then
|
||||||
|
REPLY="ladspa=file=${1}.so:label=${1}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
getladspa crap_eq_const_T420
|
||||||
|
_M_SPEAKERS="$REPLY"
|
||||||
|
getladspa level
|
||||||
|
_M_LEVEL="$REPLY"
|
||||||
|
|
||||||
|
if [[ "$(uname -n)" == "spectre" ]]; then
|
||||||
|
#MPV_STREAM_FLAGS+=" --af=lavfi=[$_M_LEVEL,$_M_LIMIT]"
|
||||||
|
MPV_STREAM_FLAGS+=" --af=lavfi=[$_M_KILL,$_M_LIMIT]"
|
||||||
|
fi
|
||||||
|
if [[ "$(uname -n)" == "banshee" ]]; then
|
||||||
|
MPV_STREAM_FLAGS+=" --af=lavfi=[$_M_KILL,$_M_SPEAKERS,$_M_LIMIT]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
watchstream() {
|
||||||
|
local url="$1"
|
||||||
|
shift
|
||||||
|
livestreamer "$url" best "$@" -p mpv $LIVESTREAMER_FLAGS -a \
|
||||||
|
"$MPV_STREAM_FLAGS ${2:+--autofit=}${2:-} {filename}"
|
||||||
|
}
|
||||||
|
|
||||||
|
twitch() {
|
||||||
|
local user="$1"
|
||||||
|
shift
|
||||||
|
watchstream "twitch.tv/$user" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
hitbox() {
|
||||||
|
local user="$1"
|
||||||
|
shift
|
||||||
|
watchstream "hitbox.tv/$user" "$@"
|
||||||
|
}
|
2
install
2
install
|
@ -53,7 +53,7 @@ PATH="${PATH:?No existing PATH}:$rc/sh"
|
||||||
|
|
||||||
backup_dir="$rc/backup-$(date '+%s')"
|
backup_dir="$rc/backup-$(date '+%s')"
|
||||||
|
|
||||||
for f in .bashrc .zshrc .-shrc .vimrc \
|
for f in .bashrc .zshrc .-shrc .streamcrap .vimrc \
|
||||||
.inputrc .screenrc .indent.pro .uncrustify.cfg; do
|
.inputrc .screenrc .indent.pro .uncrustify.cfg; do
|
||||||
dotless "$f"
|
dotless "$f"
|
||||||
r="$rc/home/$REPLY"
|
r="$rc/home/$REPLY"
|
||||||
|
|
8
sh/mw-cyg
Normal file
8
sh/mw-cyg
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
name='i686-w64-mingw32-'
|
||||||
|
set -- CC gcc CXX g++ CPP cpp LD ld AR ar \
|
||||||
|
RANLIB ranlib RC windres WINDRES windres OBJCOPY objcopy
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
export "$1=$name$2"
|
||||||
|
shift 2
|
||||||
|
done
|
Loading…
Add table
Reference in a new issue