From 24172fc4fea1de7b1b6c0852816b3c50836f5dab Mon Sep 17 00:00:00 2001 From: Sebastian Rust Date: Sun, 2 Nov 2025 10:01:00 +0100 Subject: [PATCH] feat(zsh): added zsh config --- dot_config/zsh/dot_zshenv | 7 +++++ dot_config/zsh/dot_zshrc | 38 +++++++++++++++++++++++++ dot_config/zsh/zshrc.d/starship.enabled | 1 + 3 files changed, 46 insertions(+) create mode 100644 dot_config/zsh/dot_zshenv create mode 100644 dot_config/zsh/dot_zshrc create mode 100644 dot_config/zsh/zshrc.d/starship.enabled diff --git a/dot_config/zsh/dot_zshenv b/dot_config/zsh/dot_zshenv new file mode 100644 index 0000000..b76b98b --- /dev/null +++ b/dot_config/zsh/dot_zshenv @@ -0,0 +1,7 @@ +if [ -z ${ENV} ]; then + export ENV="${HOME}/.env.d"; +fi + +for config in "${ENV}"/*.enabled(N); do + source "$config" +done diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc new file mode 100644 index 0000000..aa82d8c --- /dev/null +++ b/dot_config/zsh/dot_zshrc @@ -0,0 +1,38 @@ +### Added by Zinit's installer +if [[ ! -f $ZDOTDIR/.zinit/bin/zinit.zsh ]]; then + print -P "%F{33}▓▒░ %F{220}Installing DHARMA Initiative Plugin Manager (zdharma/zinit)…%f" + command mkdir -p "$ZDOTDIR/.zinit" && command chmod g-rwX "$ZDOTDIR/.zinit" + command git clone https://github.com/zdharma-continuum/zinit "$ZDOTDIR/.zinit/bin" && \ + print -P "%F{33}▓▒░ %F{34}Installation successful.%f" || \ + print -P "%F{160}▓▒░ The clone has failed.%f" +fi +source "$ZDOTDIR/.zinit/bin/zinit.zsh" +autoload -Uz _zinit +(( ${+_comps} )) && _comps[zinit]=_zinit +### End of Zinit installer's chunk +zinit ice wait"2" lucid as"program" pick"bin/git-dsf" +zinit light zdharma-continuum/zsh-diff-so-fancy + +zinit ice wait"2" lucid as"program" pick"$ZPFX/bin/git-now" make"prefix=$ZPFX install" +zinit light iwata/git-now + +zinit ice wait"2" lucid as"program" pick"$ZPFX/bin/git-alias" make"PREFIX=$ZPFX" nocompile +zinit light tj/git-extras + +zinit ice wait"2" lucid as"program" atclone'perl Makefile.PL PREFIX=$ZPFX' atpull'%atclone' \ + make'install' pick"$ZPFX/bin/git-cal" +zinit light k4rthik/git-cal + +zinit light "supercrabtree/k" + +zinit load atuinsh/atuin + +zinit load "kevinywlui/zlong_alert.zsh" + +ZSHRC_DIR="${ZDOTDIR:-$HOME/.config/zsh}/zshrc.d" +if [[ -d $ZSHRC_DIR ]]; then + for f in "${ZSHRC_DIR}/"*.enabled(N); do + [[ -f $f && -r $f ]] || continue + source "$f" + done +fi diff --git a/dot_config/zsh/zshrc.d/starship.enabled b/dot_config/zsh/zshrc.d/starship.enabled new file mode 100644 index 0000000..e643a2d --- /dev/null +++ b/dot_config/zsh/zshrc.d/starship.enabled @@ -0,0 +1 @@ + eval "$(starship init zsh)"