56 lines
2 KiB
Text
56 lines
2 KiB
Text
# 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"
|
||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
|
||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||
|
||
# SDKMAN!
|
||
export SDKMAN_DIR="$HOME/.sdkman"
|
||
[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|