zsh: Reorder config
This commit is contained in:
parent
9be160d26c
commit
0115161a81
|
@ -15,6 +15,72 @@ export PATH="$HOME/.cargo/bin:$PATH"
|
|||
## Local binaries
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
|
||||
# Program aliases/env
|
||||
|
||||
## Aliases for programs
|
||||
if which exa 2>&1 >> /dev/null;then
|
||||
alias exa="exa --git --binary"
|
||||
alias ls="exa"
|
||||
fi
|
||||
alias ipy="ipython3"
|
||||
|
||||
alias vim="nvim"
|
||||
alias vimdiff="nvim -d"
|
||||
export EDITOR=nvim
|
||||
|
||||
# Debian packages fd as fdfind
|
||||
command -v fdfind >/dev/null && alias fd="fdfind"
|
||||
|
||||
## Environment variables
|
||||
export HVSC_BASE="$HOME/Documents/sound/HVSC/"
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" # force antialiasing in java
|
||||
|
||||
## include docker functions
|
||||
source ~/.zshrc.docker
|
||||
|
||||
## drone ci
|
||||
function drone-add-hub() {
|
||||
drone secret add --name docker_username --data sbruder "$1"
|
||||
drone secret add --name docker_password --data "$(pass devops/docker|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-registry() {
|
||||
drone secret add --name docker_username --data simon "$1"
|
||||
drone secret add --name docker_password --data "$(pass sbruder.de/account|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-netlify() {
|
||||
drone secret add --name netlify_auth_token --data "$(pass-field web/netlify.com Drone-Key)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-s3() {
|
||||
drone secret add --name aws_access_key_id --data "$(pass-field sbruder.de/minio/personal User)" "$1"
|
||||
drone secret add --name aws_secret_access_key --data "$(pass sbruder.de/minio/personal|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone() (
|
||||
export DRONE_SERVER="$(pass-field sbruder.de/drone Server)"
|
||||
export DRONE_TOKEN="$(pass sbruder.de/drone|head -n 1)"
|
||||
command drone $@
|
||||
)
|
||||
|
||||
function docker-ls() (
|
||||
export DOCKER_LS_PASSWORD="$(pass sbruder.de/account|head -n 1)"
|
||||
command docker-ls $@
|
||||
)
|
||||
|
||||
function docker-rm() (
|
||||
export DOCKER_LS_PASSWORD="$(pass sbruder.de/account|head -n 1)"
|
||||
command docker-rm $@
|
||||
)
|
||||
|
||||
## lexicon
|
||||
function lecicon() (
|
||||
export LEXICON_HENET_USERNAME="$(pass-field management/he User)"
|
||||
export LEXICON_HENET_PASSWORD="$(pass management/he|head -n 1)"
|
||||
lexicon $@
|
||||
)
|
||||
|
||||
# Prompt
|
||||
command -v starship >/dev/null && eval $(starship init zsh)
|
||||
|
||||
|
@ -184,72 +250,6 @@ function audacious-hack() (
|
|||
audacious --play
|
||||
)
|
||||
|
||||
# Program aliases/env
|
||||
|
||||
## Aliases for programs
|
||||
if which exa 2>&1 >> /dev/null;then
|
||||
alias exa="exa --git --binary"
|
||||
alias ls="exa"
|
||||
fi
|
||||
alias ipy="ipython3"
|
||||
|
||||
alias vim="nvim"
|
||||
alias vimdiff="nvim -d"
|
||||
export EDITOR=nvim
|
||||
|
||||
# Debian packages fd as fdfind
|
||||
command -v fdfind >/dev/null && alias fd="fdfind"
|
||||
|
||||
## Environment variables
|
||||
export HVSC_BASE="$HOME/Documents/sound/HVSC/"
|
||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on" # force antialiasing in java
|
||||
|
||||
## include docker functions
|
||||
source ~/.zshrc.docker
|
||||
|
||||
## drone ci
|
||||
function drone-add-hub() {
|
||||
drone secret add --name docker_username --data sbruder "$1"
|
||||
drone secret add --name docker_password --data "$(pass devops/docker|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-registry() {
|
||||
drone secret add --name docker_username --data simon "$1"
|
||||
drone secret add --name docker_password --data "$(pass sbruder.de/account|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-netlify() {
|
||||
drone secret add --name netlify_auth_token --data "$(pass-field web/netlify.com Drone-Key)" "$1"
|
||||
}
|
||||
|
||||
function drone-add-s3() {
|
||||
drone secret add --name aws_access_key_id --data "$(pass-field sbruder.de/minio/personal User)" "$1"
|
||||
drone secret add --name aws_secret_access_key --data "$(pass sbruder.de/minio/personal|head -n 1)" "$1"
|
||||
}
|
||||
|
||||
function drone() (
|
||||
export DRONE_SERVER="$(pass-field sbruder.de/drone Server)"
|
||||
export DRONE_TOKEN="$(pass sbruder.de/drone|head -n 1)"
|
||||
command drone $@
|
||||
)
|
||||
|
||||
function docker-ls() (
|
||||
export DOCKER_LS_PASSWORD="$(pass sbruder.de/account|head -n 1)"
|
||||
command docker-ls $@
|
||||
)
|
||||
|
||||
function docker-rm() (
|
||||
export DOCKER_LS_PASSWORD="$(pass sbruder.de/account|head -n 1)"
|
||||
command docker-rm $@
|
||||
)
|
||||
|
||||
## lexicon
|
||||
function lecicon() (
|
||||
export LEXICON_HENET_USERNAME="$(pass-field management/he User)"
|
||||
export LEXICON_HENET_PASSWORD="$(pass management/he|head -n 1)"
|
||||
lexicon $@
|
||||
)
|
||||
|
||||
# Completion
|
||||
autoload -U bashcompinit
|
||||
bashcompinit
|
||||
|
|
Reference in a new issue