dotfiles/.zshrc.local

60 lines
2.1 KiB
Text
Raw Normal View History

2020-09-21 20:29:22 +02:00
# Aliases
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
2021-05-21 03:18:56 +02:00
if hash exa 2>/dev/null; then
2020-09-21 20:29:22 +02:00
alias ls='exa --color=automatic'
else
alias ls='ls --color=auto'
fi
alias ll='ls -l'
alias la='ls -a'
alias lla='ls -al'
alias color-picker='grim -g "$(slurp -p)" -t ppm - | convert - -format "%[pixel:p{0,0}]" txt:-'
2021-03-02 17:54:01 +01:00
alias foundryvtt='pushd ~/Games/FoundryVTT && (node resources/app/main.js --dataPath="$HOME/.local/share/FoundryVTT/" && popd) || popd'
2021-05-14 17:04:38 +02:00
alias ts='watson log -dcj | watson2timesheet'
2020-09-21 20:29:22 +02:00
# Prompt
autoload -U colors zsh/terminfo
colors
2021-05-21 03:18:56 +02:00
zstyle ':vcs_info:git:*' formats "%{$fg[yellow]%}%b%{$reset_color%} "
if [ -n "$SSH_CONNECTION" ]; then
zstyle ':prompt:grml:left:setup' items rc change-root user at host path vcs percent
else
zstyle ':prompt:grml:left:setup' items rc change-root path vcs percent
fi
zstyle ':prompt:grml:right:setup' items
2020-09-21 20:29:22 +02:00
zstyle ':prompt:grml:left:items:user' pre "%{$fg[blue]%}"
zstyle ':prompt:grml:left:items:user' post "%{$reset_color%}"
2021-05-21 03:18:56 +02:00
zstyle ':prompt:grml:left:items:host' pre "%{$fg[magenta]%}"
zstyle ':prompt:grml:left:items:host' post "%{$reset_color%}"
zstyle ':prompt:grml:left:items:path' token '%30<..<%~%<< '
zstyle ':prompt:grml:left:items:path' pre "%{$fg[cyan]%}"
2020-09-21 20:29:22 +02:00
zstyle ':prompt:grml:left:items:path' post "%{$reset_color%}"
2021-05-21 03:18:56 +02:00
zstyle ':prompt:grml:left:items:percent' token '%(!.#.) '
zstyle ':prompt:grml:left:items:percent' pre "%{$fg[green]%}"
zstyle ':prompt:grml:left:items:percent' post "%{$reset_color%}"
2020-09-21 20:29:22 +02:00
2021-05-21 03:18:56 +02:00
# SSH agent
if hash keychain 2>/dev/null; then
eval `keychain --quiet --agents ssh --eval`
2020-09-21 20:29:22 +02:00
fi
2021-05-21 03:18:56 +02:00
# fzf
2021-05-21 03:26:50 +02:00
[ -s "/usr/share/fzf/key-bindings.zsh" ] && . "/usr/share/fzf/key-bindings.zsh"
[ -s "/usr/share/fzf/completion.zsh" ] && . "/usr/share/fzf/completion.zsh"
2020-09-21 20:29:22 +02:00
2021-05-21 03:18:56 +02:00
# NVM
2020-10-30 18:28:24 +01:00
export NVM_DIR="$HOME/.nvm"
NODE_VERSION="v14.17.0"
NODE_PATH="$NVM_DIR/versions/node/$NODE_VERSION"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" --no-use
2021-05-21 03:26:50 +02:00
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
[ -d "$NODE_PATH/bin" ] && export PATH=$NODE_PATH/bin:$PATH
2020-10-30 18:28:24 +01:00
2020-09-21 20:29:22 +02:00
# SDKMAN!
export SDKMAN_DIR="$HOME/.sdkman"
2021-05-21 03:26:50 +02:00
[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ] && . "$SDKMAN_DIR/bin/sdkman-init.sh"