-
Notifications
You must be signed in to change notification settings - Fork 2
/
zshrc
97 lines (77 loc) · 2.42 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
# ---- START
# Uncomment next line + last line of file
# to see what's taking time to load:
#
# zmodload zsh/zprof
source $HOME/aliases.zsh
source $HOME/path_config.zsh
# ZSH
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
HYPHEN_INSENSITIVE="true"
ZSH_DISABLE_COMPFIX="true"
# Make autosuggestions visible
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#757575"
source $ZSH/oh-my-zsh.sh
# Theme for cat alternative (bat):
export BAT_THEME="OneHalfDark"
# Load antigen plugins:
source $HOME/antigen.zsh
antigen bundle Aloxaf/fzf-tab
antigen bundle zsh-users/zsh-autosuggestions
antigen apply
# Homebrew
alias brew='arch -arm64 brew'
# Ruby
alias gem='arch -arm64 gem'
alias bundle='arch -arm64 bundle'
rbenv() {
arch -arm64 rbenv "$@"
}
# OpenSSL
export LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib"
export CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/[email protected]/lib/pkgconfig"
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/homebrew/opt/[email protected]"
# Use tmux by default when using terminal
if [ -z "$TMUX" ]; then
tmux attach -t default || tmux new -s default
fi
# Make sure Vim colors work in tmux:
# export TERM="xterm-256color-italic"
export TERM=xterm-256color
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# ssh
export SSH_KEY_PATH="~/.ssh/rsa_id"
# For Go:
export GOPATH="${HOME}/.go"
export GOROOT="/opt/homebrew/opt/go/libexec"
pathadd "${GOPATH}/bin"
pathadd "${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"
# FZF
export FZF_DEFAULT_COMMAND='rg --files --hidden --smart-case --follow --glob "!.git/*"'
export FZF_CTRL_T_COMMAND='ag --nocolor -g ""'
alias f='cd && cd "$(fd --type d | fzf)"'
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# bun completions
# [ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
# for GPG sign of commits:
export GPG_TTY=$(tty)
# -- Use pyenv for python
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
# Generated by Hermit; START; DO NOT EDIT.
HERMIT_ROOT_BIN="${HERMIT_ROOT_BIN:-"$HOME/bin/hermit"}"
eval "$(test -x $HERMIT_ROOT_BIN && $HERMIT_ROOT_BIN shell-hooks --print --zsh)"
# Generated by Hermit; END; DO NOT EDIT.
# ------ END
# Uncomment next line + first line of file to see what's slow:
# zmodload zsh/zprof