Закончена проба с Oh My Zsh

This commit is contained in:
Andrei Astafev 2021-12-06 21:55:21 +03:00
parent 9d5f93b0dc
commit b3d70173c1
3 changed files with 14 additions and 6 deletions

10
.zshrc
View File

@ -1,3 +1,10 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.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
for S in \
05-start \
15-env \
@ -20,4 +27,5 @@ do
[ -e "$ZDOTDIR/$S.post.zsh" ] && source "$ZDOTDIR/$S.post.zsh"
done
true
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh

View File

@ -27,11 +27,11 @@ if [[ "$TERM_PROGRAM" == "Hyper" ]]; then
SPACESHIP_GIT_BRANCH_SHOW=false
fi
autoload is-at-least
if is-at-least "5.2" "$ZSH_VERSION"; then
ZSH_THEME="spaceship"
autoload -Uz is-at-least
if is-at-least "5.1" "$ZSH_VERSION"; then
ZSH_THEME="powerlevel10k"
if [ ! -d "$ZSH_CUSTOM/themes/${ZSH_THEME}" ]; then
git clone https://github.com/spaceship-prompt/spaceship-prompt "$ZSH_CUSTOM/themes/${ZSH_THEME}"
git clone --depth=1 https://github.com/romkatv/powerlevel10k "$ZSH_CUSTOM/themes/${ZSH_THEME}"
ln -s "${ZSH_CUSTOM}/themes/${ZSH_THEME}/${ZSH_THEME}.zsh-theme" "${ZSH_CUSTOM}/themes/${ZSH_THEME}.zsh-theme"
fi
else

View File

@ -1,7 +1,7 @@
[ -e "$ZDOTDIR/12-functions.zsh" ] && source "$ZDOTDIR/12-functions.zsh"
if [ ! -e "$ZSH/oh-my-zsh.sh" ]; then
git clone "https://github.com/ohmyzsh/ohmyzsh" "$ZSH"
git clone --depth=1 "https://github.com/ohmyzsh/ohmyzsh" "$ZSH"
fi
if [ ! -d "$ZSH_CUSTOM" ]; then