1
0
Fork 0
dotfiles/zsh/.zshrc

42 lines
1.6 KiB
Bash

# 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.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export DEFAULT_USER="anton"
export DISABLE_AUTO_UPDATE="true"
export COMPLETION_WAITING_DOTS="true"
export HISTFILE=~/.zsh_history
export HISTSIZE=1000000
export SAVEHIST=1000000
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
setopt INC_APPEND_HISTORY_TIME
setopt EXTENDED_HISTORY
source ~/.zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
GPG_TTY=$(tty)
export GPG_TTY
# Aliases
alias gib='git branch'
alias gis='git status'
alias gpoh='git push origin HEAD'
# Bindkeys
bindkey '^R' history-incremental-search-backward # ctrl + shift + r -> Reverse search
bindkey '^A' beginning-of-line # ctrl + a -> Move to start of line
bindkey '^E' end-of-line # ctrl + e -> Move to end of line
bindkey '^[[1;5D' backward-word # ctrl + left arrow -> Move back one word
bindkey '^[[1;5C' forward-word # Ctrl + right arrow -> Move forward one word
# Color different file types
export LS_COLORS='di=94:ln=36:so=35:pi=33:ex=32:bd=46;34:cd=46;34'
alias ls='ls --color=auto'