dotfiles/.zshrc.local

59 lines
2.1 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Aliases
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
if hash exa 2>/dev/null; then
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:-'
alias foundryvtt='pushd ~/Games/FoundryVTT && (node resources/app/main.js --dataPath="$HOME/.local/share/FoundryVTT/" && popd) || popd'
alias ts='watson log -dcj | watson2timesheet'
# Prompt
autoload -U colors zsh/terminfo
colors
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
zstyle ':prompt:grml:left:items:user' pre "%{$fg[blue]%}"
zstyle ':prompt:grml:left:items:user' post "%{$reset_color%}"
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]%}"
zstyle ':prompt:grml:left:items:path' post "%{$reset_color%}"
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%}"
# SSH agent
if hash keychain 2>/dev/null; then
eval `keychain --quiet --agents ssh --eval`
fi
# fzf
[ -s "/usr/share/fzf/key-bindings.zsh" ] && . "/usr/share/fzf/key-bindings.zsh"
[ -s "/usr/share/fzf/completion.zsh" ] && . "/usr/share/fzf/completion.zsh"
# NVM
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
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
[ -d "$NODE_PATH/bin" ] && export PATH=$NODE_PATH/bin:$PATH
# SDKMAN!
export SDKMAN_DIR="$HOME/.sdkman"
[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ] && . "$SDKMAN_DIR/bin/sdkman-init.sh"