zsh: Switch from powerlevel10k to pure prompt

Switched theme of zsh, just to declutter a little and make startup
slightly faster.

Removed nvm from automatically initializing to majorly speed up zsh
startup times - removing around 750ms on my system.
TODO could potentially move to a conditional startup system, in which
nvm only gets sourced on its first invocation or similar workarounds.
This commit is contained in:
Marty Oehme 2021-02-19 12:45:36 +01:00
parent b393e01a2f
commit da52dad3d7
Signed by: Marty
GPG key ID: B7538B8F50A1C800
3 changed files with 21 additions and 31 deletions

View file

@ -15,7 +15,6 @@ bc
biber
bibtool
bison
chromium
dhcpcd
dialog
diff-so-fancy
@ -47,7 +46,6 @@ iputils
jabref-latest
jpdftweak
jq
keybase-bin
licenses
linux-firmware
linux-headers
@ -86,7 +84,6 @@ paru
pass
pavolume
pdfjs
pia-tools
picom
pkgconf
playerctl
@ -152,7 +149,7 @@ xclip
xorg-xev
xorg-xinit
xorg-xinput
youtube-dlc
youtube-dl
# zsh plugins
alias-tips-git
@ -163,4 +160,4 @@ zathura-pdf-mupdf
zsh-autosuggestions
zsh-completions-git
zsh-fast-syntax-highlighting-git
zsh-theme-powerlevel10k-git
zsh-pure-prompt

View file

@ -1,6 +1,5 @@
#!/usr/bin/env zsh
#
#
# load global sh env vars
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"

View file

@ -4,13 +4,6 @@
CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
ZSHCONFDIR="$CONFDIR/zsh"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
# Set completion style
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _ignored _approximate
@ -22,10 +15,9 @@ zstyle :compinstall filename "$ZSHCONFDIR/.zshrc"
# load plugins
PLUG_FOLDER="/usr/share/zsh/plugins"
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh
source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh
source /usr/share/nvm/init-nvm.sh
#source /usr/share/nvm/init-nvm.sh
[ -e $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh ] && source $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh
# these need to be sourced after fzf-tab
[ -e $PLUG_FOLDER/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh ] && source $PLUG_FOLDER/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
@ -70,9 +62,16 @@ zstyle ':fzf-tab:complete:kill:argument-rest' extra-opts --preview=$extract'ps -
zstyle ':fzf-tab:complete:cd:*' extra-opts --preview=$extract'exa -1 --color=always $realpath'
# load completion, extended zsh moving syntax, zle edit in vim (or other $EDITOR) possibility
autoload -Uz compinit zmv edit-command-line
autoload -Uz compinit zmv edit-command-line promptinit
compinit
# pure prompt init
promptinit
prompt pure
# make it single line
prompt_newline='%666v'
PROMPT=" $PROMPT"
# shellcheck source=alias
[ -f "$CONFDIR/sh/alias" ] && source "$CONFDIR/sh/alias"
# load additional aliases
@ -197,10 +196,5 @@ dedup_pathvar() {
dedup_pathvar PATH
dedup_pathvar MANPATH
# shellcheck is not built for zsh specific uses like p10k does
# so we remove it from being analyzed and linted in shellcheck by adding underscore
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f "$ZSHCONFDIR/.p10k._zsh" ]] || source "$ZSHCONFDIR/.p10k._zsh"
unset CONFDIR
unset ZSHCONFDIR