2020-04-29 12:54:10 +02:00
|
|
|
### antibody
|
|
|
|
autoload -Uz compinit
|
|
|
|
compinit
|
|
|
|
. ${HOME}/.config/zsh/antibody.zsh
|
2019-11-18 15:36:09 +01:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### KiTTY completion
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
if which kitty > /dev/null; then
|
|
|
|
kitty + complete setup zsh | source /dev/stdin
|
2019-11-18 15:36:09 +01:00
|
|
|
fi
|
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### fasd
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
if which fasd > /dev/null; then
|
|
|
|
eval "$(fasd --init auto)"
|
|
|
|
unalias sd
|
2019-11-18 15:36:09 +01:00
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### Pipenv
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
if which pipenv > /dev/null; then
|
|
|
|
if [ -f ${HOME}/.config/zsh/pipenv.zsh ]; then
|
|
|
|
eval "$(cat ${HOME}/.config/zsh/pipenv.zsh)"
|
|
|
|
else
|
|
|
|
eval "$(pipenv --completion)"
|
|
|
|
fi
|
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### virtualenvwrapper
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
if [ -f /usr/bin/virtualenvwrapper_lazy.sh ]; then
|
|
|
|
source /usr/bin/virtualenvwrapper_lazy.sh
|
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### FZF
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
[ -f ${HOME}/.config/zsh/fzf.zsh ] && . ${HOME}/.config/zsh/fzf.zsh
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### ASDF
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
if [ -d /opt/asdf-vm ]; then
|
|
|
|
. /opt/asdf-vm/asdf.sh
|
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
### Misc
|
|
|
|
|
|
|
|
## TERM
|
|
|
|
# Many target machines do not understand TERM=xterm-kitty
|
2019-11-18 15:36:09 +01:00
|
|
|
if [ "z${TMUX}" = "z" ]; then
|
|
|
|
function ssh {
|
2020-04-29 12:54:10 +02:00
|
|
|
TERM=xterm-color /bin/ssh ${@}
|
2019-11-18 15:36:09 +01:00
|
|
|
}
|
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2019-11-18 15:36:09 +01:00
|
|
|
if [[ ! -z $TMUX ]]; then
|
|
|
|
export TERM=tmux-256color
|
|
|
|
fi
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## Editor
|
|
|
|
export EDITOR=vim
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## Locale
|
|
|
|
export LANG=.UTF-8
|
|
|
|
export LANGUAGE=en_US
|
|
|
|
export LC_CTYPE=en_US.UTF-8
|
|
|
|
export LC_NUMERIC=en_US.UTF-8
|
|
|
|
export LC_TIME=it_IT.UTF-8
|
|
|
|
export LC_COLLATE=en_US.UTF-8
|
|
|
|
export LC_MONETARY=it_IT.UTF-8
|
|
|
|
export LC_MESSAGES=en_US.UTF-8
|
|
|
|
export LC_PAPER=it_IT.UTF-8
|
|
|
|
export LC_NAME=en_US.UTF-8
|
|
|
|
export LC_ADDRESS=en_US.UTF-8
|
|
|
|
export LC_TELEPHONE=en_US.UTF-8
|
|
|
|
export LC_MEASUREMENT=it_IT.UTF-8
|
|
|
|
export LC_IDENTIFICATION=en_US.UTF-8
|
|
|
|
export LC_ALL=
|
2019-11-18 15:36:09 +01:00
|
|
|
|
|
|
|
## Flutter && Dart
|
2020-04-29 12:54:10 +02:00
|
|
|
export ANDROID_SDK=${HOME}/Android/Sdk
|
2019-11-18 15:36:09 +01:00
|
|
|
export PATH=${ANDROID_SDK}/emulator:${ANDROID_SDK}/tools:${PATH}
|
|
|
|
export PATH=$PATH:/opt/flutter/bin/:"$HOME/.pub-cache/bin"
|
2018-07-13 18:08:38 +02:00
|
|
|
|
|
|
|
## Go
|
2020-04-29 12:54:10 +02:00
|
|
|
export GOPATH=${HOME}/.go
|
|
|
|
export PATH=$PATH:${GOPATH}/bin
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2019-11-18 15:36:09 +01:00
|
|
|
## Elixir
|
|
|
|
export ERL_AFLAGS="-kernel shell_history enabled"
|
|
|
|
|
2018-07-13 18:08:38 +02:00
|
|
|
## Aliases
|
|
|
|
alias t="tmux -2"
|
|
|
|
alias sy="systemctl"
|
|
|
|
alias ssy="sudo systemctl"
|
2019-11-18 15:36:09 +01:00
|
|
|
alias syu="systemctl --user"
|
2018-07-13 18:08:38 +02:00
|
|
|
alias sl="cmatrix -b -s"
|
|
|
|
alias cd..="cmatrix -b -s -C yellow"
|
|
|
|
alias lt="ls -lt"
|
|
|
|
alias lh="ls -lh"
|
|
|
|
alias la="ls -la"
|
|
|
|
alias ll="ls -l"
|
|
|
|
alias lrt="ls -lrt"
|
2019-11-18 15:36:09 +01:00
|
|
|
alias wgpg="gpg --homedir /home/leo/.gnupg-work"
|
|
|
|
alias agpg="gpg --homedir /home/leo/.gnupg-ai"
|
2020-04-29 12:54:10 +02:00
|
|
|
alias ai_all="cat ${HOME}/Documents/personal/ai/code/prod/hosts.yml|yq '[.hosts|to_entries[]|{"key": .key, "value": .value.groups}]|from_entries'"
|
|
|
|
alias pacbrowse="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'"
|
|
|
|
alias pikbrowse="pikaur -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pikaur -Qil {} | less)'"
|
|
|
|
alias vf="cd \$(git rev-parse --show-toplevel)"
|
|
|
|
alias vvf="cd \$(${HOME}/.bin/vvf.sh)"
|
2019-11-18 15:36:09 +01:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## local bin
|
|
|
|
export PATH=${PATH}:${HOME}/.local/bin:${HOME}/.bin
|
2019-11-18 15:36:09 +01:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## Drone CLI
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
export DRONE_SERVER=https://drone.troubles.io
|
|
|
|
export DRONE_TOKEN=MAA6CxziewJZYkHLf5eV5UyEx3Qd26tb
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
# ensure Git completion
|
|
|
|
fpath+=/usr/share/git/completion
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## mailbundle
|
2018-07-13 18:08:38 +02:00
|
|
|
alias mutt="neomutt"
|
2019-11-18 15:36:09 +01:00
|
|
|
alias mailbundle="/opt/mailbundle/config/bin/autorun"
|
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## torbrowser
|
2019-11-18 15:36:09 +01:00
|
|
|
export PATH=$PATH:/opt/tor-browser_en-US
|
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## platform-tools
|
2019-11-18 15:36:09 +01:00
|
|
|
export PATH=$PATH:/opt/android-sdk/platform-tools
|
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## Custom functions
|
2019-11-18 15:36:09 +01:00
|
|
|
function lookhosts {
|
|
|
|
if which rg 2>&1 > /dev/null; then
|
|
|
|
GREP=rg
|
|
|
|
else
|
|
|
|
GREP=grep
|
|
|
|
fi
|
|
|
|
${GREP} $@ /etc/hosts
|
|
|
|
}
|
|
|
|
|
|
|
|
function reload_work_gpg {
|
|
|
|
kill -9 $(ps aux|egrep "gpg-agent.*work"|grep -v grep|awk '{print $2}')
|
|
|
|
}
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
## Custom completion
|
|
|
|
# certo
|
|
|
|
eval "$(_CERTO_COMPLETE=source_zsh certo)"
|
2018-07-13 18:08:38 +02:00
|
|
|
|
2020-04-29 12:54:10 +02:00
|
|
|
# vim: set ft=zsh et sw=0 ts=2 sts=0:
|