-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
137 lines (111 loc) · 4.44 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
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
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="powerlevel9k/powerlevel9k"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
source $HOME/.aliases
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# 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)
plugins=(
git docker docker-compose zsh-autosuggestions zsh-navigation-tools zsh_reload
z osx zsh-syntax-highlighting tmux
)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH=$PATH:~/Projects/git-browse/bin
export PATH="/Users/chris/anaconda/bin:$PATH"
source ~/.fonts/*.sh
#source /usr/local/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
#. /usr/local/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
#powerline-daemon -q
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir_writable dir rbenv vcs docker_machine )
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_CONTEXT_TEMPLATE="%n"
#POWERLEVEL9K_HOME_FOLDER_ABBREVIATION="%F{white} \uf197 %F{white}"
#POWERLEVEL9K_HOME_FOLDER_ABBREVIATION="%F{red} $(print_icon 'HOME_ICON') %F{black}"
POWERLEVEL9K_DIR_PATH_SEPARATOR="%F{black} $(print_icon 'LEFT_SUBSEGMENT_SEPARATOR') %F{white}"
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="010"
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="white"
POWERLEVEL9K_DIR_HOME_FOREGROUND="white"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="010"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="white"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
export GOPATH=$HOME/Projects
export PATH=$GOPATH/bin:$PATH
#export PATH="/usr/local/bin:$PATH"
#export PATH="/usr/local/sbin:$PATH"
fpath=($ZSH/apps/deer $fpath)
autoload -U deer
zle -N deer
bindkey '\ek' deer
zstyle ':deer:' height 28
export NVM_DIR="/Users/chris/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
source ~/.nvm/nvm.sh
#I'm highlighting out the test for if this is an ssl connection so i can always have tmux.
#if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
# tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
#fi
eval $(thefuck --alias)
#'/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
dps() {
docker ps $@ | awk '
NR==1{
FIRSTLINEWIDTH=length($0)
IDPOS=index($0,"CONTAINER ID");
IMAGEPOS=index($0,"IMAGE");
COMMANDPOS=index($0,"COMMAND");
CREATEDPOS=index($0,"CREATED");
STATUSPOS=index($0,"STATUS");
PORTSPOS=index($0,"PORTS");
NAMESPOS=index($0,"NAMES");
UPDATECOL();
}
function UPDATECOL () {
ID=substr($0,IDPOS,IMAGEPOS-IDPOS-1);
IMAGE=substr($0,IMAGEPOS,COMMANDPOS-IMAGEPOS-1);
COMMAND=substr($0,COMMANDPOS,CREATEDPOS-COMMANDPOS-1);
CREATED=substr($0,CREATEDPOS,STATUSPOS-CREATEDPOS-1);
STATUS=substr($0,STATUSPOS,PORTSPOS-STATUSPOS-1);
PORTS=substr($0,PORTSPOS,NAMESPOS-PORTSPOS-1);
NAMES=substr($0, NAMESPOS);
}
function PRINT () {
print ID NAMES IMAGE STATUS CREATED COMMAND PORTS;
}
NR==2{
NAMES=sprintf("%s%*s",NAMES,length($0)-FIRSTLINEWIDTH,"");
PRINT();
}
NR>1{
UPDATECOL();
PRINT();
}' | less -FSX;
}
dpsa() { dps -a $@; }