summaryrefslogtreecommitdiff
path: root/zsh/.zshrc
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2020-10-22 07:31:59 -0400
committerKjetil Orbekk <kj@orbekk.com>2020-10-22 07:31:59 -0400
commit3a660f68f1d6a200e7ce98068cc7a0406bb38182 (patch)
tree63955e78ab06aa42613fba863bd3d7e6bafcb8e1 /zsh/.zshrc
parent354923f337c17127503dcbd209d090d978e0ecff (diff)
Switch to zsh powerline10k prompt
Diffstat (limited to 'zsh/.zshrc')
-rw-r--r--zsh/.zshrc20
1 files changed, 13 insertions, 7 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index f8d6f65..b079d37 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -1,10 +1,15 @@
+# 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
+
# Resources:
# https://github.com/mika/zsh-pony
bindkey -e
-fpath+=$HOME/.zsh/pure
-
autoload -Uz compinit; compinit
autoload -Uz promptinit; promptinit
@@ -21,13 +26,11 @@ HISTSIZE=1000000
SAVEHIST=$HISTSIZE
setopt append_history share_history histignorealldups
+source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme
+
# cd to a directory used as a commant
setopt autocd
-PURE_GIT_PULL=0
-PURE_GIT_UNTRACKED_DIRTY=0
-prompt pure
-
alias ls="ls --color"
(( $+commands[exa] )) && alias ls="exa"
@@ -47,7 +50,7 @@ if (( $+commands[fzf] )); then
fi
if (( $+commands[zoxide] )); then
- eval "$(zoxide init zsh)"
+ eval "$(zoxide init zsh)"
fi
source ~/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
@@ -57,3 +60,6 @@ if [[ ! -f ~/.zsh/fast-syntax-highlighting/current_theme.zsh ]]; then
fi
source ~/.zshrc.local
+
+# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
+[[ ! -f ~/.zsh/p10k.zsh ]] || source ~/.zsh/p10k.zsh