1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 03:21:30 +01:00

zsh: themes: remove brethil-minimal, reabsorb into default theme

This commit is contained in:
bretello 2024-08-12 18:01:54 +02:00
parent c6031e3a42
commit 48a27f8c1c
3 changed files with 18 additions and 14 deletions

View File

@ -28,8 +28,7 @@ My own dotfiles. `zsh` configuration based on [antidote](https://github.com/matt
│ │     zsh plugins sourced by antidote │ │     zsh plugins sourced by antidote
├──────── oh-my-zsh themes ──────── ├──────── oh-my-zsh themes ────────
│ └── themes │ └── themes
│     ├─ brethil.zsh-theme │     └─ brethil.zsh-theme
│     └─ brethil-minimal.zsh-theme
├──────── Misc rc files──────── ├──────── Misc rc files────────
│ ├── gitconfig │ ├── gitconfig
│ │    └── git configuration │ │    └── git configuration
@ -96,3 +95,11 @@ Docker images are regularly built, and they include a full development environme
```bash ```bash
docker run -it registry.decapod.one/brethil/dotfiles docker run -it registry.decapod.one/brethil/dotfiles
``` ```
## Theme customization
To set a slightly more minimal prompt setup, the environment variable `DOTFILES_MINIMAL` can be set in `~/.zshrc` to reduce the space the path section of the prompt occupies, as well as removing the right prompt:
```bash
export DOTFILES_MINIMAL=true
```

View File

@ -1,10 +0,0 @@
# vim:ft=zsh ts=2 sw=2 sts=2
local ret_status="%(?:%{$fg_bold[green]%}➜%{$reset_color%}:%{$fg[red]%}➜%{$reset_color%})"
local user="%(#:root@:)"
PROMPT='[%{$fg[red]%}${user}%M%{$reset_color%}][:%{$fg[green]%}%c%{$reset_color%}]$(git_prompt_info) ${ret_status} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}√%{$reset_color%}"

View File

@ -27,7 +27,12 @@ else
fi fi
# Shows last 3 items in path if there are more than 4 # Shows last 3 items in path if there are more than 4
if [[ -n $DOTFILES_MINIMAL ]]; then
local path_prompt='[%F{green}%(4~:…/%3~:%~)%f]' local path_prompt='[%F{green}%(4~:…/%3~:%~)%f]'
else
local path_prompt='[%F{green}%c%f]'
fi
# PREFIX/SUFFIX are added before/after `git_prompt_info` # PREFIX/SUFFIX are added before/after `git_prompt_info`
ZSH_THEME_GIT_PROMPT_PREFIX=" %f%{$fg[yellow]%} " ZSH_THEME_GIT_PROMPT_PREFIX=" %f%{$fg[yellow]%} "
@ -95,4 +100,6 @@ export INSERT_MODE_INDICATOR="[%B%K{28}ins%k%b]" # green background
# see https://github.com/zsh-users/zsh-autosuggestions/issues/570 for more information # see https://github.com/zsh-users/zsh-autosuggestions/issues/570 for more information
PROMPT='$(__virtualenv_info)'"${user_prompt}${path_prompt}${git_prompt}${job_prompt}${shlvl_prompt}$(__prompt_too_long)${prompt_with_previous_return_status}%{$(__print_prompt_marker)%} " PROMPT='$(__virtualenv_info)'"${user_prompt}${path_prompt}${git_prompt}${job_prompt}${shlvl_prompt}$(__prompt_too_long)${prompt_with_previous_return_status}%{$(__print_prompt_marker)%} "
# right prompt indicator: return code, vi mode prompt info and current time # right prompt indicator: return code, vi mode prompt info and current time
if [[ -z $DOTFILES_MINIMAL ]]; then
RPS1="${return_code_RPS1}"'$(vi_mode_prompt_info)[%*]' RPS1="${return_code_RPS1}"'$(vi_mode_prompt_info)[%*]'
fi