# ~/.zshrc # # to change default shell, use chsh -s $(which zsh) # # create custom env variables: export cproj="/home/brian/Documents/Code/forks/" # custom BROWSER env for ddgr: export BROWSER=links export TUIR_BROWSER=librewolf export EDITOR=nvim # Colorizes man pages export LESS_TERMCAP_mb=$'\e[1;34m' export LESS_TERMCAP_md=$'\e[1;34m' export LESS_TERMCAP_me=$'\e[0m' export LESS_TERMCAP_se=$'\e[0m' export LESS_TERMCAP_so=$'\e[01;33m' export LESS_TERMCAP_ue=$'\e[0m' export LESS_TERMCAP_us=$'\e[1;4;33m' # Formats history command with dates/times export HISTTIMEFORMAT="%d/%m/%y %T " # Configure thefuck eval "$(thefuck --alias)" # Change with care: export PATH="$PATH:$GOPATH/bin:/home/brian/scripts:/home/brian/.local/bin:/home/brian/.local/share/nvim/lsp_servers" # Configure grep output colors export GREP_COLORS='ms=01;34' # Enable fuzzy file finder [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # Don't show completion until at least 1 character has been typed zstyle ':autocomplete:*' min-input 1 # autoload -U compinit; compinit # # Plugins source ~/.zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh # Colors autoload -Uz colors && colors # Load version control information autoload -Uz vcs_info precmd() { vcs_info } # git info/styling for prompt zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' unstagedstr '%B%F{yellow} +' zstyle ':vcs_info:*' stagedstr '%B%F{green} ✓' zstyle ':vcs_info:git:*' formats '%b%u%c' zstyle ':vcs_info:git:*' actionformats '%b|%a%u%c' # Set up the prompt (with git branch name) setopt PROMPT_SUBST # some useful options (man zshoptions) setopt autocd extendedglob nomatch menucomplete setopt interactive_comments stty stop undef # Disable ctrl-s to freeze terminal zle_highlight=('paste:none') # pasting text using ctrl+shift+v doesn't highlight # beeping is annoying unsetopt BEEP # PROMPT='[%n@%m %1~]%F{green}(${vcs_info_msg_0_})%F{white}$ ' PROMPT='%B%F{blue}[%n@%M %B%F{white}'%1~'%B%F{blue}]$ %B%F{white}${vcs_info_msg_0_}%B%F{blue} └─▶%B%F{white} ' function erase_history { local HISTSIZE=0; } erase_history && hash -r # Set up vim mode bindkey -v # Kitty Shell Integration # if test -n "$KITTY_INSTALLATION_DIR"; then # export KITTY_SHELL_INTEGRATION="enabled" # autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration # kitty-integration # unfunction kitty-integration # fi source ~/.aliases # Plugins (that need to be at the end of the zshrc script) source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh