-
Notifications
You must be signed in to change notification settings - Fork 2
/
.zshrc.symlink
153 lines (125 loc) · 3.82 KB
/
.zshrc.symlink
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
# Env vars
## ZSH & Oh my zsh
ZSH_DISABLE_COMPFIX=true
ZSH=$HOME/.oh-my-zsh
DEFAULT_USER="danielkirsch"
HISTSIZE=1000
SAVEHIST=1000
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Path
## brew
#export BREW_BIN="$(brew --prefix)/bin"
#export BREW_SBIN="$(brew --prefix)/sbin"
## node
export NODE_PATH="/usr/local/lib/node:/usr/local/lib/node_modules"
export NODE_BIN="/usr/local/share/npm/bin"
## haskell
export HASKELL_BIN="$HOME/Library/Haskell/bin"
export STACK_BIN="$HOME/.local/bin"
export CABAL_BIN=~/.cabal/bin
## latex
export TEX_BIN="/Library/TeX/texbin"
# Heroku Toolbelt
export HEROKU_BIN="/usr/local/heroku/bin"
## php
export COMPOSER_BIN="~/.composer/vendor/bin"
# idea
export IDEA_BIN="/Applications/IntelliJ IDEA CE.app/Contents/MacOS"
# path
export PATH=$IDEA_BIN:$BREW_BIN:$BREW_SBIN:$NODE_BIN:$STACK_BIN:$CABAL_BIN:$HASKELL_BIN:$TEX_BIN:$HEROKU_BIN:$COMPOSER_BIN:$PATH
## java
export JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=256m"
export SBT_OPTS="-XX:MaxPermSize=256m"
## fix jslint
export JS_CMD=`which node`
## Android
export ANDROID_HOME=/usr/local/opt/android-sdk
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
# Python virtualenv/pipenv
export PIP_RESPECT_VIRTUALENV=true
#export PIP_REQUIRE_VIRTUALENV=true
export VIRTUAL_ENV_DISABLE_PROMPT=1
#export PIPENV_VENV_IN_PROJECT=1
export SYSTEM_VERSION_COMPAT=0
# R
export RSTUDIO_WHICH_R="$BREW_BIN/R"
# ollama
export OLLAMA_HOST="http://localhost:11434"
# Language version managers
## Java
if command -v jenv &> /dev/null; then
eval "$(jenv init -)"
else
echo "Warning: jenv is not installed or not in PATH."
fi
# Python
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if which pyenv > /dev/null;
then eval "$(pyenv init -)";
else
echo "Warning: pyenv is not installed or not in PATH."
fi
#export CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include"
#export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib"
if [ -f "$HOME/.rye/env" ]; then
source "$HOME/.rye/env"
fi
# rbenv
load_rbenv () {
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$($BREW_BIN/brew --prefix [email protected])"
}
# nvm
load_nvm () {
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
}
# Other tools
if command -v hub &> /dev/null; then
eval "$(hub alias -s)"
else
echo "Warning: hub is not installed or not in PATH."
fi
[[ -f $(brew --prefix)/etc/profile.d/z.sh ]] && . $(brew --prefix)/etc/profile.d/z.sh
# direnv
if command -v direnv &> /dev/null; then
eval "$(direnv hook zsh)"
else
echo "Warning: direnv is not installed or not in PATH."
fi
# fzf
if command -v fzf &> /dev/null; then
source <(fzf --zsh)
else
echo "Warning: fzf is not installed or not in PATH."
fi
if command -v zoxide &> /dev/null; then
eval "$(zoxide init zsh)"
else
echo "Warning: zoxide is not installed or not in PATH."
fi
# Add the thefuck alias evaluation if it's installed
if command -v thefuck &> /dev/null; then
eval $(thefuck --alias)
else
echo "Warning: thefuck is not installed or not in PATH."
fi
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='code -w'
fi
export SVN_EDITOR=$EDITOR
export VISUAL=$EDITOR
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Prompt
eval "$(starship init zsh)"
# More imports
[[ -a ~/.aliases ]] && source ~/.aliases
[[ -a ~/.secrets.sh ]] && source ~/.secrets.sh
[[ -a ~/.billie.sh ]] && source ~/.billie.sh
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"