Compare commits
No commits in common. "17359d1fd035b058a7e50e5adfe67bf549bc1a1f" and "a0beaae3c6eb79a91ec44acf04897cece8d0adb6" have entirely different histories.
17359d1fd0
...
a0beaae3c6
5 changed files with 38 additions and 1757 deletions
|
@ -1,10 +1,6 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
typeset -A ZINIT
|
ZINIT_HOME=${XDG_CACHE_HOME:-~/.cache}/zsh/zinit
|
||||||
ZINIT[HOME_DIR]=${XDG_CACHE_HOME:-~/.cache}/zinit
|
if [[ -e $ZINIT_HOME/bin/zmodules/Src/zdharma/zplugin.so ]]; then
|
||||||
ZINIT[BIN_DIR]=${ZINIT[HOME_DIR]}/zinit.git
|
module_path+=( $ZINIT_HOME/bin/zmodules/Src )
|
||||||
ZINIT[ZCOMPDUMP_PATH]=${XDG_CACHE_HOME:-~/.cache}/zsh/zcompdump.zsh
|
zmodload zdharma/zplugin
|
||||||
|
|
||||||
if [[ -e ${ZINIT[HOME_DIR]}/module/Src/zdharma_continuum/zinit.so ]]; then
|
|
||||||
module_path+=( ${ZINIT[HOME_DIR]}/module/Src )
|
|
||||||
zmodload zdharma_continuum/zinit
|
|
||||||
fi
|
fi
|
||||||
|
|
6
dot-config/zsh/interactive+login/show_fortune
Normal file
6
dot-config/zsh/interactive+login/show_fortune
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#! 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
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,13 @@
|
||||||
#! zsh
|
#! zsh
|
||||||
|
typeset -A ZINIT
|
||||||
|
ZINIT[HOME_DIR]=$ZINIT_HOME
|
||||||
|
ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump
|
||||||
|
|
||||||
[[ ! -d $ZINIT[HOME_DIR] ]] && mkdir -p $ZINIT[HOME_DIR]
|
if [[ ! -f $ZINIT_HOME/bin/zinit.zsh ]]; then
|
||||||
if [[ ! -d $ZINIT[BIN_DIR]/.git ]]; then
|
git clone https://github.com/zdharma-continuum/zinit $ZINIT_HOME/bin
|
||||||
git clone https://github.com/zdharma-continuum/zinit.git $ZINIT[BIN_DIR]
|
zcompile $ZINIT_HOME/bin/zinit.zsh
|
||||||
zcompile $ZINIT[BIN_DIR]/zinit.zsh
|
|
||||||
fi
|
fi
|
||||||
source $ZINIT[BIN_DIR]/zinit.zsh
|
source $ZINIT_HOME/bin/zinit.zsh
|
||||||
load=light
|
load=light
|
||||||
|
|
||||||
zinit $load willghatch/zsh-saneopt
|
zinit $load willghatch/zsh-saneopt
|
||||||
|
@ -13,8 +15,14 @@ zinit $load willghatch/zsh-saneopt
|
||||||
zinit $load mafredri/zsh-async
|
zinit $load mafredri/zsh-async
|
||||||
zinit $load rupa/z
|
zinit $load rupa/z
|
||||||
|
|
||||||
zinit ice depth'1'
|
if (( $+commands[starship] )); then
|
||||||
zinit $load romkatv/powerlevel10k
|
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
|
||||||
|
|
||||||
if (( $+commands[vivid] )); then
|
if (( $+commands[vivid] )); then
|
||||||
export LS_COLORS=$(vivid generate molokai)
|
export LS_COLORS=$(vivid generate molokai)
|
||||||
|
@ -22,11 +30,13 @@ else
|
||||||
zinit pack:no-dir-color-swap for ls_colors
|
zinit pack:no-dir-color-swap for ls_colors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zinit wait lucid light-mode for \
|
zinit ice silent wait:1 atload:_zsh_autosuggest_start
|
||||||
mollifier/cd-gitroot \
|
zinit $load zsh-users/zsh-autosuggestions
|
||||||
atinit"dot-zsh-compinit" \
|
|
||||||
zdharma-continuum/fast-syntax-highlighting \
|
zinit ice blockf; zinit $load zsh-users/zsh-completions
|
||||||
atload"_zsh_autosuggest_start" \
|
|
||||||
zsh-users/zsh-autosuggestions \
|
zinit ice silent wait:1; zinit $load mollifier/cd-gitroot
|
||||||
blockf atpull'zinit creinstall -q .' \
|
zinit ice silent wait:1; zinit $load micha/resty
|
||||||
zsh-users/zsh-completions
|
zinit ice silent wait:1; zinit $load supercrabtree/k
|
||||||
|
|
||||||
|
zinit ice silent wait!1; zinit $load zdharma-continuum/fast-syntax-highlighting
|
||||||
|
|
|
@ -1,29 +1,10 @@
|
||||||
# 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
|
source $ZDOTDIR/zinit
|
||||||
for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
|
for f in $ZDOTDIR/interactive/^*.zwc(N); source $f
|
||||||
|
|
||||||
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
|
zpcompinit && zpcdreplay
|
||||||
|
([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &!
|
||||||
|
|
||||||
export POWERLEVEL9K_CONFIG_FILE=${ZDOTDIR}/p10k.zsh
|
[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f
|
||||||
# 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
|
# 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
|
# show the "error" colour on first launch. To avoid this, we simply end with a
|
||||||
|
|
Loading…
Reference in a new issue