3434# }}
3535
3636
37+ # --- 主题配置 {{
38+
39+ # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
40+ # Initialization code that may require console input (password prompts, [y/n]
41+ # confirmations, etc.) must go above this block; everything else may go below.
42+ if [[ -r " ${XDG_CACHE_HOME:- $HOME / .cache} /p10k-instant-prompt-${(% ):-% n} .zsh" ]]; then
43+ source " ${XDG_CACHE_HOME:- $HOME / .cache} /p10k-instant-prompt-${(% ):-% n} .zsh"
44+ fi
45+
46+ # 除了这里默认配置的 powerlevel10k 主题, 还可以使用一些简洁的主题,
47+ # 比如: ys, robbyrussell, amuse, agnoster, random
48+ # doc: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
49+ ZSH_THEME=" powerlevel10k/powerlevel10k"
50+
51+ # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
52+ [[ ! -f ~ /.p10k.zsh ]] || source ~ /.p10k.zsh
53+
54+ # }}
55+
56+
3757# --- 基础配置 {{
3858
3959# 解决 source ~/.zshrc 和 ~/.tmux.conf 中 set-environment -g PATH 导致的 PATH 变量值重复的问题.
@@ -51,10 +71,6 @@ export ZSH="$HOME/.oh-my-zsh"
5171# 为 zsh 定制的内容的放置目录.
5272export ZSH_CUSTOM=" $ZSH /custom"
5373
54- # 推荐的主题列表: ys, robbyrussell, amuse, agnoster, random
55- # doc: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
56- ZSH_THEME=" ys"
57-
5874# 标准插件存放在: $ZSH/plugins/
5975# 定制插件存放在: $ZSH_CUSTOM/plugins/
6076# NOTE:
@@ -94,19 +110,13 @@ plugins=(
94110 colorize
95111 colored-man-pages
96112 sudo
97- timer
98113 themes
99114 urltools
100115 copyfile
101116 copydir
102117 aliases
103118)
104119
105- # timer
106- # Default: 1
107- TIMER_PRECISION=2
108- # Default: '/%d'
109- TIMER_FORMAT=' [%d]'
110120
111121# 解决粘贴较长的内容到终端命令行时速度太慢的问题.
112122# NOTE:
@@ -208,6 +218,8 @@ export PATH="/usr/local/opt/python3/bin:$PATH"
208218# poetry completions zsh > $(brew --prefix)/share/zsh/site-functions/_poetry
209219# poetry help completions
210220# exec zsh
221+ # NOTE:
222+ # 1) Do not use 'deactivate' to exit from 'poetry shell', use 'exit'.
211223export PATH=" /Users/xg/Library/Python/3.9/bin:$PATH "
212224
213225# ****** Lua ******
0 commit comments