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:
parent
b393e01a2f
commit
da52dad3d7
3 changed files with 21 additions and 31 deletions
|
@ -15,7 +15,6 @@ bc
|
||||||
biber
|
biber
|
||||||
bibtool
|
bibtool
|
||||||
bison
|
bison
|
||||||
chromium
|
|
||||||
dhcpcd
|
dhcpcd
|
||||||
dialog
|
dialog
|
||||||
diff-so-fancy
|
diff-so-fancy
|
||||||
|
@ -47,7 +46,6 @@ iputils
|
||||||
jabref-latest
|
jabref-latest
|
||||||
jpdftweak
|
jpdftweak
|
||||||
jq
|
jq
|
||||||
keybase-bin
|
|
||||||
licenses
|
licenses
|
||||||
linux-firmware
|
linux-firmware
|
||||||
linux-headers
|
linux-headers
|
||||||
|
@ -86,7 +84,6 @@ paru
|
||||||
pass
|
pass
|
||||||
pavolume
|
pavolume
|
||||||
pdfjs
|
pdfjs
|
||||||
pia-tools
|
|
||||||
picom
|
picom
|
||||||
pkgconf
|
pkgconf
|
||||||
playerctl
|
playerctl
|
||||||
|
@ -152,7 +149,7 @@ xclip
|
||||||
xorg-xev
|
xorg-xev
|
||||||
xorg-xinit
|
xorg-xinit
|
||||||
xorg-xinput
|
xorg-xinput
|
||||||
youtube-dlc
|
youtube-dl
|
||||||
|
|
||||||
# zsh plugins
|
# zsh plugins
|
||||||
alias-tips-git
|
alias-tips-git
|
||||||
|
@ -163,4 +160,4 @@ zathura-pdf-mupdf
|
||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
zsh-completions-git
|
zsh-completions-git
|
||||||
zsh-fast-syntax-highlighting-git
|
zsh-fast-syntax-highlighting-git
|
||||||
zsh-theme-powerlevel10k-git
|
zsh-pure-prompt
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
#
|
#
|
||||||
#
|
|
||||||
|
|
||||||
# load global sh env vars
|
# load global sh env vars
|
||||||
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
||||||
|
|
|
@ -4,13 +4,6 @@
|
||||||
CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
ZSHCONFDIR="$CONFDIR/zsh"
|
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
|
# Set completion style
|
||||||
# The following lines were added by compinstall
|
# The following lines were added by compinstall
|
||||||
zstyle ':completion:*' completer _complete _ignored _approximate
|
zstyle ':completion:*' completer _complete _ignored _approximate
|
||||||
|
@ -22,10 +15,9 @@ zstyle :compinstall filename "$ZSHCONFDIR/.zshrc"
|
||||||
|
|
||||||
# load plugins
|
# load plugins
|
||||||
PLUG_FOLDER="/usr/share/zsh/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/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/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
|
[ -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
|
# 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
|
[ -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'
|
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
|
# 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
|
compinit
|
||||||
|
|
||||||
|
# pure prompt init
|
||||||
|
promptinit
|
||||||
|
prompt pure
|
||||||
|
# make it single line
|
||||||
|
prompt_newline='%666v'
|
||||||
|
PROMPT=" $PROMPT"
|
||||||
|
|
||||||
# shellcheck source=alias
|
# shellcheck source=alias
|
||||||
[ -f "$CONFDIR/sh/alias" ] && source "$CONFDIR/sh/alias"
|
[ -f "$CONFDIR/sh/alias" ] && source "$CONFDIR/sh/alias"
|
||||||
# load additional aliases
|
# load additional aliases
|
||||||
|
@ -197,10 +196,5 @@ dedup_pathvar() {
|
||||||
dedup_pathvar PATH
|
dedup_pathvar PATH
|
||||||
dedup_pathvar MANPATH
|
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 CONFDIR
|
||||||
unset ZSHCONFDIR
|
unset ZSHCONFDIR
|
||||||
|
|
Loading…
Reference in a new issue