-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot_zshrc.tmpl
109 lines (88 loc) · 2.9 KB
/
dot_zshrc.tmpl
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
# Chezmoi Template file - DO NOT EDIT DIRECTLY #
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
plugins=(
zsh-autosuggestions
zsh-syntax-highlighting
poetry-cmds
git-cmds
pytest
)
source $ZSH/oh-my-zsh.sh
### User configuration
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
export JAVA_HOME="/opt/homebrew/opt/openjdk@11"
export PATH="$HOME/.local/bin:$PATH" # poetry
export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH"
export GOPATH="$HOME/go"
export PATH="$GOPATH/bin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -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
export EDITOR=nvim
export FZF_DEFAULT_OPTS="
--multi \
--height=50% \
--layout=reverse-list \
--border=rounded \
--info=inline \
--prompt='$>' \
--pointer='→' \
--marker='♡' \
--header='CTRL-c or ESC to quit' \
--color='dark,fg:magenta'
"
export FZF_DEFAULT_COMMAND="
fd --type f \
--strip-cwd-prefix \
--hidden \
--follow \
--exclude .git \
--exclude=__pycache__
"
autoload -Uz compinit
zstyle ':completion:*' menu select
fpath+=~/.zfunc
function _note() {
$EDITOR "$HOME/.notes/2024/daily-$(date -I).md";
};
alias note=_note
alias vim=nvim
alias cat=bat
alias nvimdiff='nvim -d'
alias cm=chezmoi
alias vf='vim $(fzf)'
alias ls=eza
alias ll='eza --long'
alias tree='eza --tree'
alias die='kill -KILL %1'
autoload -Uz change_directory
bindkey -s '^f' 'change_directory\n'
bindkey -s '^b' 'git switch $(git branch | fzf)\n'
bindkey '^I' complete-word # tab | complete
bindkey '^[[Z' autosuggest-accept # shift + tab | autosuggest
bindkey '^ ' forward-word # ctrl + space | complete word-by-word
eval "$(zoxide init zsh)" # must run after compinit
### OS specifics
{{- if eq .chezmoi.hostname "daarashaw-MTF9WQPC2P" }}
source "$HOME"/.work_dotfiles
export PATH="$HOME/.dotnet/tools:$PATH"
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export PATH="$HADOOP_HOME/bin:$PATH"
export PATH="$SPARK_HOME/bin:$PATH"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/daarashaw/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/daarashaw/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/daarashaw/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/daarashaw/google-cloud-sdk/completion.zsh.inc'; fi
{{- else }}
alias ynab-split="poetry run -C ~/dev/ynab-commands ynab-split"
[ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" # ghcup-env
alias sclang="/Applications/SuperCollider.app/Contents/MacOS/sclang"
{{- end }}
# keep this at the end of ~/.zshrc
eval "$(starship init zsh)"