add zshrc
This commit is contained in:
commit
6608857688
3538
home/.zshrc
Normal file
3538
home/.zshrc
Normal file
File diff suppressed because it is too large
Load diff
86
home/.zshrc.local
Normal file
86
home/.zshrc.local
Normal file
|
@ -0,0 +1,86 @@
|
|||
# Programming languages
|
||||
|
||||
## Go
|
||||
export GOROOT="$HOME/opt/go"
|
||||
export GOPATH="$HOME/opt/gopath"
|
||||
PATH="$PATH:$GOPATH/bin:$GOROOT/bin"
|
||||
|
||||
## Node
|
||||
PATH="$PATH:/home/simon/opt/node/bin"
|
||||
|
||||
## Python (pip)
|
||||
PATH="$PATH:/home/simon/.local/bin"
|
||||
|
||||
## Dart
|
||||
|
||||
PATH="$PATH:/home/simon/opt/dart-sdk/bin"
|
||||
|
||||
## Lua
|
||||
|
||||
PATH="$PATH:$HOME/.luarocks/bin/"
|
||||
|
||||
# Misc
|
||||
|
||||
## Local binaries
|
||||
|
||||
PATH="$PATH:$HOME/bin"
|
||||
|
||||
# Ergonomic
|
||||
|
||||
## Battery percentage
|
||||
alias batt="upower -i /org/freedesktop/UPower/devices/battery_BAT0|grep percentage|awk '{print $2}'"
|
||||
|
||||
## Upload to transfer.sh
|
||||
transfer() {
|
||||
if [ $# -eq 0 ];then
|
||||
echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
|
||||
return 1
|
||||
fi
|
||||
tmpfile=$(mktemp -t transferXXX)
|
||||
if tty -s;then
|
||||
basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
|
||||
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile
|
||||
else
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile
|
||||
fi
|
||||
cat $tmpfile
|
||||
rm -f $tmpfile
|
||||
}
|
||||
|
||||
|
||||
## Touchpad enabling/disabling
|
||||
function touchpad() {
|
||||
touchpad="SynPS/2 Synaptics TouchPad"
|
||||
if [[ $1 == "disable" ]];then
|
||||
xinput disable "$touchpad"
|
||||
else
|
||||
xinput enable "$touchpad"
|
||||
fi
|
||||
}
|
||||
|
||||
# Fancy stuff
|
||||
|
||||
## dircolors
|
||||
eval "$(dircolors -b $HOME/.dircolors)"
|
||||
|
||||
## Color switcher
|
||||
alias dynamic-colors="~/.dynamic-colors/bin/dynamic-colors"
|
||||
|
||||
# Bugs
|
||||
|
||||
## silversearcher-ag and not apt-get
|
||||
unalias ag
|
||||
|
||||
# Program aliases/env
|
||||
|
||||
## Aliases for programs
|
||||
alias atom="/home/simon/opt/atom/atom"
|
||||
alias tearstop="compton --backend=glx"
|
||||
alias vobsub2srt="docker run -v $PWD:/data --rm -it vobsub2srt vobsub2srt"
|
||||
alias apktool="java -jar ~/opt/apktool_2.3.1.jar"
|
||||
alias mpvhdr="mpv --tone-mapping=hable"
|
||||
|
||||
## Environment variables
|
||||
export HVSC_BASE="$HOME/Dokumente/sound/HVSC/"
|
||||
export ESP_ROOT="$HOME/projekte/esp8266/esp-open-sdk"
|
||||
export ANDROID_HOME="$HOME/projekte/android/sdk"
|
4
home/.zshrc.pre
Normal file
4
home/.zshrc.pre
Normal file
|
@ -0,0 +1,4 @@
|
|||
## HOMESHICK
|
||||
|
||||
source "$HOME/.homesick/repos/homeshick/homeshick.sh"
|
||||
fpath=($HOME/.homesick/repos/homeshick/completions $fpath)
|
Reference in a new issue