Introduce a self-contained repo with an interactive install.sh that provisions zsh, oh-my-zsh, aliases, bat/yazi configs, docker shortcuts, and git-delta pager setup. Configs are adapted from dotfiles for SSH-only servers — no desktop or neovim dependencies. Installer supports --all, --update (git pull + re-run), and --uninstall with backup restore. Core packages include vim (default editor), yazi via apt, and idempotent apt installs with warnings for eza and git-delta when repos lack them.
30 lines
803 B
Bash
30 lines
803 B
Bash
autoload -Uz vcs_info
|
|
|
|
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
|
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
zstyle ':vcs_info:svn:*' branchformat '%b'
|
|
zstyle ':vcs_info:svn:*' formats ' [%b%F{1}:%F{11}%i%c%u%B%F{green}]'
|
|
zstyle ':vcs_info:*' enable git svn
|
|
|
|
theme_precmd () {
|
|
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
|
zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{green}]'
|
|
else
|
|
zstyle ':vcs_info:git:*' formats ' [%b%c%u%B%F{red}●%F{green}]'
|
|
fi
|
|
|
|
vcs_info
|
|
}
|
|
|
|
setopt prompt_subst
|
|
PROMPT='%B%F{33}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% '
|
|
|
|
autoload -U add-zsh-hook
|
|
add-zsh-hook precmd theme_precmd
|
|
|
|
# to preview colors
|
|
# for i in {0..255}; do
|
|
# print -P "%F{$i}$i%f "
|
|
# done
|