-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc.linux
146 lines (121 loc) · 4.58 KB
/
zshrc.linux
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
#path to your oh-my-zsh installation.
export ZSH=/home/tsara27/.oh-my-zsh
# 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)
# Add wisely, as too many plugins slow down shell startup.
plugins+=(git)
# User configuration
# export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
source ~/.cocoa_docker_env
# autoload -U promptinit; promptinit
# prompt pure
# source $HOME/.cargo/env
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
#
# Global config
export EDITOR=nvim
# Bundle config
export BUNDLE_GITHUB__HTTPS=true
export GIT_EDITOR=nvim
# NVIM true color
export NVIM_TUI_ENABLE_TRUE_COLOR=1
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias b="bash"
alias bex="bundle exec"
alias br="bundle exec rspec"
alias cl="clear"
alias gadd="git add"
alias gits="git status"
alias gt="git status"
alias rtest="rake test"
alias towork="cd ~/Works"
alias zr="zeus rspec"
alias zrff="zeus rspec --fail-fast"
alias start-rabbitmq="/usr/local/sbin/rabbitmq-server start"
alias nvim="stty stop '' -ixoff ; nvim"
alias vimr="stty stop '' -ixoff ; vimr"
alias dc="docker-compose run --rm"
alias diff="colordiff"
alias ra="approvals verify -d 'code --diff' -a"
alias pgstart="sudo systemctl start postgresql.service"
# Tmux aliases
alias tkill="tmux kill-session -t"
alias tls="tmux ls"
alias tatt="tmux attach"
alias restartgnome="killall -SIGQUIT gnome-shell"
# Remove unused branches
alias git_clean="git branch --merged | egrep -v \"(^\*|master|staging)\" | xargs git branch -d"
# Alias for amitree
alias run_tests="bex tmuxinator start test"
alias stop_tests="bex tmuxinator stop test"
alias run_server="bex tmuxinator start amitree"
alias start_server="bex tmuxinator start amitree"
alias stop_server="bex tmuxinator stop amitree"
# . ~/OTP/20.2/activate
#export PATH="$PATH:$HOME/.kerl"
# Activate Erlang
. ~/.kerl/23.0.2/activate
# --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 --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_OPTS='--height 100% --layout=reverse --border'
test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/home/tsara27/.cargo/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
[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap #Autoload mapping
# Satori git config
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
# Autoload nvm use
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
# imagemagick brew
export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/imagemagick@6/lib"
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/imagemagick@6/include"
# Set key rate
xset r rate 300 60
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# Export terminfo path
export TERMINFO='/usr/share/terminfo/'
# Enable italic inside terminal
echo "export TERM=xterm-256color-italic" >> ~/.zshrc
# Add rbenv to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
eval "$(rbenv init -)"
eval "$(starship init zsh)"
export PATH="/home/linuxbrew/.linuxbrew/opt/imagemagick@6/bin:$PATH"
export TERM=xterm-256color-italic