-
Notifications
You must be signed in to change notification settings - Fork 4
/
.zshrc
157 lines (122 loc) Β· 4.46 KB
/
.zshrc
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Enable zsh profiler #
#######################
# zmodload zsh/zprof
# Path to your oh-my-zsh configuration.
export PATH="/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/curl/bin:/Users/$USER/bin:/Users/$USER/.oh-my-zsh/bin:/Users/$USER/go/bin:~/bin/terraform:/opt/homebrew/Cellar/bind/9.16.23/bin:/opt/homebrew/bin:$HOME/.gem/ruby/3.0.0/bin:/Users/$USER/.cargo/bin:$PATH"
export ZSH_DISABLE_COMPFIX=false
export ZSH=$HOME/.oh-my-zsh
export ZSH_CUSTOM=$HOME/.oh-my-zsh/custom
export TERM="xterm-256color"
export LDFLAGS="-L/usr/local/opt/curl/lib"
export CPPFLAGS="-I/usr/local/opt/curl/include"
export CARGO_NET_GIT_FETCH_WITH_CLI=true
export NVM_DIR="$HOME/.nvm"
# Enable Rbenv for Rubies!
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
# Manage NVM
export NVM_LAZY_LOAD=true
export NVM_COMPLETION=true
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="powerlevel10k/powerlevel10k"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
export UPDATE_ZSH_DAYS=15
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# all of our zsh files
typeset -U config_files
config_files=(~/.zsh.d/**/*.zsh)
# load the path files
for file in ${(M)config_files:#*/path.zsh}
do
source $file
done
# load everything but the path and completion files
for file in ${${config_files:#*/path.zsh}:#*/completion.zsh}
do
source $file
done
# initialize autocomplete here, otherwise functions won't be loaded
autoload -U compinit
compinit -D ~/Users/$USER/.zcompdump
# load every completion after autocomplete loads
for file in ${(M)config_files:#*/completion.zsh}
do
source $file
done
unset config_files
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(
evalcache
bgnotify
branch
docker
dotenv
emoji
extract
git
golang
jsontools
#kubectl
macos
rbenv
sudo
)
# VISUAL CUSTOMIZATIONS
# Remove @username from prompt. We already know whoami
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(battery dir rbenv vcs)
# Elements options of right prompt
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs history time)
# POWERLEVEL9K_HOME_ICON='π '
# POWERLEVEL9K_FOLDER_ICON='π'
# POWERLEVEL9K_HOME_SUB_ICON='π'
# POWERLEVEL9K_ETC_ICON='βοΈ'
# Change prompt use two lines
# POWERLEVEL9K_PROMPT_ON_NEWLINE=true
# POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="ο£Ώ %f"
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="\n "
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX=">"
# Customizations for second line
local user_symbol="$"
if [[ $(print -P "%#") =~ "#" ]]; then
user_symbol = "#"
fi
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX="%{%B%F{#ffd19b}%K{#ff6a23}%} $user_symbol%{%b%f%k%F{#ff6a23}%}ξ° %{%f%}"
# Customize battery plugin
POWERLEVEL9K_BATTERY_STAGES="βββββ
βββ"
POWERLEVEL9K_BATTERY_CHARGING="yellow"
POWERLEVEL9K_BATTERY_CHARGED="green"
POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
POWERLEVEL9K_BATTERY_LOW_COLOR="red"
[ -f $ZSH/oh-my-zsh.sh ] && source $ZSH/oh-my-zsh.sh
# Perf improvements
#eval "$(rbenv init -)"
_evalcache rbenv init -
eval "$(direnv hook zsh)"
#_evalcache direnv hook zsh
_evalcache /opt/homebrew/bin/brew shellenv
#eval "$(/opt/homebrew/bin/brew shellenv)"
_evalcache rbenv init -
# eval "$(rbenv init -)"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
#source /opt/homebrew/opt/powerlevel10k/powerlevel10k.zsh-theme