Files
dotfiles/zsh/.zshrc

69 lines
2.0 KiB
Bash
Raw Normal View History

2021-10-23 17:41:05 +02:00
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
2023-06-02 15:51:31 +02:00
[[ -f ~/.zsh/.powerline_config ]] && source ~/.zsh/.powerline_config
[[ -f ~/.zsh/.user_config ]] && source ~/.zsh/.user_config
[[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh
2021-01-11 10:35:01 +01:00
[[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config
2018-07-29 16:26:51 +02:00
2022-09-06 13:25:54 +02:00
# Load Antidote
2022-10-06 16:36:52 +02:00
mkdir -p ${ZDOTDIR:-~}/.cache/zsh
2022-09-27 13:18:21 +02:00
static_file=${ZDOTDIR:-~}/.cache/zsh/.zsh_plugins.zsh
2022-09-06 13:25:54 +02:00
plugins_txt=${ZDOTDIR:-~}/.zsh/.zsh_plugins.txt
2022-09-06 10:50:17 +02:00
# clone antidote if necessary
if ! [[ -e ${ZDOTDIR:-~}/.antidote ]]; then
git clone https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
fi
2022-09-06 10:50:17 +02:00
# source antidote and load plugins from `${ZDOTDIR:-~}/.zsh_plugins.txt`
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
2022-09-06 13:25:54 +02:00
antidote load ${plugins_txt} ${static_file}
setopt interactivecomments
setopt HIST_IGNORE_SPACE
# Clear screen by ctrl+q
bindkey '^q' clear-screen
2019-08-22 15:27:20 +02:00
2023-02-21 11:15:19 +01:00
# Bind Ctrl-W to kill-region
bindkey "^w" kill-region
2023-07-21 09:14:10 +02:00
bindkey -v
VI_MODE_SET_CURSOR=true
2023-02-21 11:15:19 +01:00
2018-07-29 16:26:51 +02:00
alias vim=nvim
2019-08-22 15:27:20 +02:00
alias sudo='sudo '
2018-07-29 16:26:51 +02:00
export EDITOR='nvim'
2023-07-21 09:14:10 +02:00
export VISUAL='nvim'
2019-02-28 13:36:24 +01:00
2019-08-22 15:27:20 +02:00
alias ls="ls --color=always"
2023-02-21 11:16:26 +01:00
alias cgrep="grep --color=always"
delzip() {
unzip -Z -1 "$@" | xargs -I{} rm -rf {}
}
# mitmproxy
export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
2021-10-27 14:56:12 +02:00
[[ -f ~/.zsh/.mac_config ]] && source ~/.zsh/.mac_config
2023-02-09 16:29:49 +01:00
if `which go &>/dev/null`; then
export PATH="$PATH:$(go env GOPATH)/bin"
export GOPATH=$(go env GOPATH)
fi
2023-07-25 13:59:37 +02:00
# Sudo workaround for neovim
export SUDO_ASKPASS=$(command -v ssh-askpass)
# Powerlevel 10k
# Remove padding on right side
ZLE_RPROMPT_INDENT=0
# To customize prompt, run `p10k configure` or edit ~/dotfiles/zsh/.p10k.zsh.
2022-02-17 09:59:48 +01:00
if test -f ~/dotfiles/zsh/.p10k.mac.zsh; then
source ~/dotfiles/zsh/.p10k.mac.zsh
else
2022-02-17 10:06:56 +01:00
[[ ! -f ~/dotfiles/zsh/.p10k.zsh ]] || source ~/dotfiles/zsh/.p10k.zsh
2022-02-17 09:59:48 +01:00
fi
2022-11-15 13:55:38 +01:00
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"