Compare commits

..

9 commits

5 changed files with 1757 additions and 38 deletions

View file

@ -1,6 +1,10 @@
#! zsh
ZINIT_HOME=${XDG_CACHE_HOME:-~/.cache}/zsh/zinit
if [[ -e $ZINIT_HOME/bin/zmodules/Src/zdharma/zplugin.so ]]; then
module_path+=( $ZINIT_HOME/bin/zmodules/Src )
zmodload zdharma/zplugin
typeset -A ZINIT
ZINIT[HOME_DIR]=${XDG_CACHE_HOME:-~/.cache}/zinit
ZINIT[BIN_DIR]=${ZINIT[HOME_DIR]}/zinit.git
ZINIT[ZCOMPDUMP_PATH]=${XDG_CACHE_HOME:-~/.cache}/zsh/zcompdump.zsh
if [[ -e ${ZINIT[HOME_DIR]}/module/Src/zdharma_continuum/zinit.so ]]; then
module_path+=( ${ZINIT[HOME_DIR]}/module/Src )
zmodload zdharma_continuum/zinit
fi

View file

@ -1,6 +0,0 @@
#! zsh
(( $+commands[fortune] )) || return
for say in ponysay cowsay cat; (( $+commands[$say] )) && break
[[ $say = cowsay ]] && say=(cowsay -n)
[[ $say = ponysay ]] && say=(ponysay -W $(( COLUMNS - 1 )) -b unicode)
fortune $XDG_CACHE_HOME/sav-quotes/quotes | $say

1712
dot-config/zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,11 @@
#! zsh
typeset -A ZINIT
ZINIT[HOME_DIR]=$ZINIT_HOME
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump
if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then
git clone https://github.com/zdharma-continuum/zinit $ZINIT_HOME/bin
zcompile $ZINIT_HOME/bin/zinit.zsh
[[ ! -d $ZINIT[HOME_DIR] ]] && mkdir -p $ZINIT[HOME_DIR]
if [[ ! -d $ZINIT[BIN_DIR]/.git ]]; then
git clone https://github.com/zdharma-continuum/zinit.git $ZINIT[BIN_DIR]
zcompile $ZINIT[BIN_DIR]/zinit.zsh
fi
source $ZINIT_HOME/bin/zinit.zsh
source $ZINIT[BIN_DIR]/zinit.zsh
load=light
zinit $load willghatch/zsh-saneopt
@ -15,14 +13,8 @@ zinit $load willghatch/zsh-saneopt
zinit $load mafredri/zsh-async
zinit $load rupa/z
if (( $+commands[starship] )); then
source <(starship init zsh --print-full-init)
autoload starship_pure_title_precmd starship_pure_title_preexec
precmd_functions+=(starship_pure_title_precmd)
preexec_functions+=(starship_pure_title_preexec)
else
zinit $load sindresorhus/pure
fi
zinit ice depth'1'
zinit $load romkatv/powerlevel10k
if (( $+commands[vivid] )); then
export LS_COLORS=$(vivid generate molokai)
@ -30,13 +22,11 @@ else
zinit pack:no-dir-color-swap for ls_colors
fi
zinit ice silent wait:1 atload:_zsh_autosuggest_start
zinit $load zsh-users/zsh-autosuggestions
zinit ice blockf; zinit $load zsh-users/zsh-completions
zinit ice silent wait:1; zinit $load mollifier/cd-gitroot
zinit ice silent wait:1; zinit $load micha/resty
zinit ice silent wait:1; zinit $load supercrabtree/k
zinit ice silent wait!1; zinit $load zdharma-continuum/fast-syntax-highlighting
zinit wait lucid light-mode for \
mollifier/cd-gitroot \
atinit"dot-zsh-compinit" \
zdharma-continuum/fast-syntax-highlighting \
atload"_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions

View file

@ -1,11 +1,30 @@
# 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
# Optimised compinit taking advantage of zinit's completion handling, as well
# as compiling the resulting zcompdump file. Have zinit call this once
# everything is loaded using an atload ice.
dot-zsh-compinit() {
[[ -d $ZINIT[ZCOMPDUMP_PATH] ]] || mkdir -p ${ZINIT[ZCOMPDUMP_PATH]:h}
zicompinit || return $?
zicdreplay || return $?
([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &!
return 0
}
source $ZDOTDIR/zinit
for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
zpcompinit && zpcdreplay
([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &!
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
export POWERLEVEL9K_CONFIG_FILE=${ZDOTDIR}/p10k.zsh
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k.zsh
[[ ! -f $POWERLEVEL9K_CONFIG_FILE ]] || source $POWERLEVEL9K_CONFIG_FILE
# If zsh init ends with a failing command (like a conditional) the prompt will
# show the "error" colour on first launch. To avoid this, we simply end with a
# true command: