dotfiles/.zshrc.local

53 lines
1.7 KiB
Text
Raw Permalink 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-05-14 17:04:38 +02:00
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
# 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-07-12 11:56:34 +02:00
# fnm
2021-07-12 11:58:05 +02:00
if hash fnm 2>/dev/null; then
2021-07-12 11:56:34 +02:00
eval "$(fnm env)"
fi
2020-10-30 18:28:24 +01:00
2022-08-15 13:49:38 +02:00
# Go
export GOPATH="$HOME/Development/go"
2023-07-18 00:01:53 +02:00
export PATH="$PATH:$HOME/Development/go/bin"
# Individual configuration
. "$HOME/.zshrc.local.local"