-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zshrc.tmpl
More file actions
47 lines (40 loc) · 1.46 KB
/
dot_zshrc.tmpl
File metadata and controls
47 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.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
{{- if eq .chezmoi.os "darwin" }}
# Homebrew (macOS)
if [[ -f /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
{{- end }}
# XDG Base Directory
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
# User binaries
export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# Editor
export EDITOR='nvim'
export VISUAL='nvim'
# Source modular config files
for config_file in \
"$XDG_CONFIG_HOME/zsh/options.zsh" \
"$XDG_CONFIG_HOME/zsh/history.zsh" \
"$XDG_CONFIG_HOME/zsh/completion.zsh" \
"$XDG_CONFIG_HOME/zsh/keybindings.zsh" \
"$XDG_CONFIG_HOME/zsh/plugins.zsh" \
"$XDG_CONFIG_HOME/zsh/aliases.zsh" \
"$XDG_CONFIG_HOME/zsh/functions.zsh"
do
[[ -f "$config_file" ]] && source "$config_file"
done
unset config_file
# fnm (Fast Node Manager)
if command -v fnm &>/dev/null; then
eval "$(fnm env --use-on-cd)"
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh