diff options
| author | Ewy~ <ewy0@protonmail.com> | 2025-01-13 23:11:54 +0100 |
|---|---|---|
| committer | Ewy~ <ewy0@protonmail.com> | 2025-01-13 23:11:54 +0100 |
| commit | 2b3cd782b3a94ff458418c4d8b5eeb3dca0a1bc9 (patch) | |
| tree | 220c4c5a0c35b5d9051f21537c747265ff3d0f68 | |
| parent | 9fa95d851dbbe1d866b85848f6215e8e2d1dedf0 (diff) | |
added theme
| -rw-r--r-- | .config/zsh/themes/ewout.zsh-theme | 36 | ||||
| -rw-r--r-- | .zshrc | 7 |
2 files changed, 37 insertions, 6 deletions
diff --git a/.config/zsh/themes/ewout.zsh-theme b/.config/zsh/themes/ewout.zsh-theme new file mode 100644 index 0000000..78fff90 --- /dev/null +++ b/.config/zsh/themes/ewout.zsh-theme @@ -0,0 +1,36 @@ +autoload colors && colors + +__git() { + command -v git > /dev/null || return + [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == true ]] && echo " $(git branch --show-current)" +} + +__wrap() { + [ -z "$@" ] && return + echo "─[$@]─" +} + +__exitStatus() { + code=$1 + [ $1 != 0 ] && echo $code +} + +__exitFace() { + code=$1 + [ $1 = 0 ] && echo "$fg[green]:3$reset_color" + [ $1 != 0 ] && echo "$fg[red]D:$reset_color" +} + +__prompt() { + echo "%# " +} + +__generate_prompt() { + lastExit="$?" + cat <<ENDPROMPT +╭$(__wrap $(__exitStatus $lastExit))$(__wrap '%~')$(__wrap '%n')$(__wrap $(__git))┄ +╰$(__wrap $(__exitFace $lastExit))┄ $(__prompt) +ENDPROMPT +} + +PROMPT='$(__generate_prompt)' @@ -1,23 +1,19 @@ setopt completealiases alias dotfiles='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' -zmodload zsh/zprof ZSH_CUSTOM="$HOME/.config/zsh" -ZSH_THEME="funky" +ZSH_THEME="ewout" zstyle ':omz:update' mode auto plugins=( aliases alias-finder archlinux cp - copyfile - copypath git git-commit git-escape-magic git-extras gitignore - git-prompt kate man node @@ -35,4 +31,3 @@ plugins=( ) . /usr/share/oh-my-zsh/oh-my-zsh.sh -zprof |
