-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
111 lines (88 loc) · 2.9 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
#
# Executes commands at the start of an interactive session.
#
# zmodload zsh/zprof
# Install zplug if not exists
# if [[ ! -d ~/.zplug ]]; then
# curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
# fi
# Source zplug
source /usr/share/zplug/init.zsh
# zplug check returns true if all packages are installed
# Therefore, when it returns false, run zplug install
# if ! zplug check; then
# zplug install
# fi
# FZF
if zplug check junegunn/fzf-bin; then
# setting if FZF is available
# export FZF_DEFAULT_COMMAND='ag -g ""'
# --files: List files that would be searched but do not search
# --no-ignore: Do not respect .gitignore, etc...
# --hidden: Search hidden files and folders
# --follow: Follow symlinks
# --glob: Additional conditions for search (in this case ignore everything in the .git/ folder)
export FZF_DEFAULT_COMMAND='rg --files --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_OPTS='--color=16'
# export FZF_DEFAULT_OPTS='
# --color fg:124,bg:16,hl:202,fg+:214,bg+:52,hl+:231
# --color info:52,prompt:196,spinner:208,pointer:196,marker:208
# '
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
fi
# Customize to your needs...
zstyle ':akarzim:*:*' color 'yes'
zstyle ':akarzim:module:git:log:context' format 'oneline'
zstyle ':akarzim:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github' 'id_ed25519'
# Then, source plugins and add commands to $PATH
# zplug load --verbose
zplug load
# init MacTeX
# eval `/usr/libexec/path_helper -s`
# init PYenv
pyenv() {
eval "$( command pyenv init - )"
pyenv "$@"
}
# Source Tmuxinator
test -f "${HOME}/.tmuxinator.zsh" && source "${HOME}/.tmuxinator.zsh"
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# zoxide
if (( $+commands[zoxide] )); then
eval "$(zoxide init zsh)"
fi
# starship prompt
if (( $+commands[starship] )); then
eval "$(starship init zsh)"
fi
# Java Developer Kit
test -d "/usr/local/opt/openjdk/bin" && export PATH="/usr/local/opt/openjdk/bin:$PATH"
# asdf
if [[ -f "/usr/local/lib/asdf.sh" ]]; then
source "/usr/local/lib/asdf.sh"
path=(${HOME}/.asdf/shims $path)
# append completions to fpath
fpath=(${ASDF_DIR}/completions $fpath)
fi
# rbenv
if [[ -f "${HOME}/.rbenv/bin/rbenv" ]]; then
eval "$(~/.rbenv/bin/rbenv init - zsh)"
fi
# Needed for a proper GnuPG agent forwarding
if (( $+commands[gpgconf] )); then
test -d "/run/user" && gpgconf --create-socketdir
fi
# NVM
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
# Yarn
export PATH="$PATH:`yarn global bin`"
# Scalingo
if [[ -f "${HOME}/.zsh/completion/scalingo_complete.zsh" ]]; then
source ~/.zsh/completion/scalingo_complete.zsh
fi
# Modular ZSH
test -f "${ZDOTDIR:-$HOME}/.zsh/init.zsh" && source "${ZDOTDIR:-$HOME}/.zsh/init.zsh"
# zprof