From bfd4eef5cf04c5fc3c0a8ec65e15858bcb600b2c Mon Sep 17 00:00:00 2001 From: PorridgePi Date: Tue, 27 Sep 2022 13:20:00 +0000 Subject: [PATCH] zshrc: chore: Organise code --- .zshrc | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.zshrc b/.zshrc index e6b66a2..1af4d2f 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,4 @@ +########## Powerlevel10k instant prompt ####################################### # 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. @@ -5,17 +6,9 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -export PATH="$HOME/bin:$PATH" -export TERM=xterm-256color - -eval $(thefuck --alias) - -#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! -export SDKMAN_DIR="$HOME/.sdkman" -[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" - -### Added by Zinit's installer +########## Zinit ############################################################## +### Added by Zinit's installerW if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit" @@ -38,15 +31,18 @@ zinit light-mode for \ ### End of Zinit's installer chunk + +########## Personal ########################################################### +export PATH="$HOME/bin:$PATH" +export TERM=xterm-256color +eval $(thefuck --alias) + # Case-insensitive autocomplete zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' autoload -Uz compinit && compinit zinit ice depth=1; zinit light romkatv/powerlevel10k -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - # zsh-autosuggestions zinit light zsh-users/zsh-autosuggestions @@ -58,3 +54,14 @@ zinit light zsh-users/zsh-history-substring-search bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down export HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=true + + +########## Powerlevel10k ###################################################### +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + + +########## SDKMAN! ############################################################ +# THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"