This repository has been archived by the owner on Apr 15, 2018. It is now read-only.
forked from jmberros/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc.laptop
162 lines (130 loc) · 4.57 KB
/
.zshrc.laptop
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# 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="robbyrussell" # I use this in the desktop
#ZSH_THEME="awesomepanda"
#ZSH_THEME="blinks"
#ZSH_THEME="cypher"
#ZSH_THEME="afowler"
#ZSH_THEME="random"
#ZSH_THEME="wezm+"
#ZSH_THEME="daveverwer"
ZSH_THEME="tjkirch" # I use this in the notebook
# linux handy aliases
alias ls='ls --color=auto --group-directories-first'
alias sl='ls --color=auto --group-directories-first'
alias l='ls --color=auto --group-directories-first'
alias ll='ls -alF --color=auto --group-directories-first'
alias la='ls -A --color=auto --group-directories-first'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ..='cs ..'
alias tmux="tmux -2"
alias xclip="xclip -selection primary -f | xclip -selection clipboard"
alias put="xsel -p"
alias arrakis='ssh [email protected]'
# coding and gitting
alias be='bundle exec'
alias s='clear; git status'
# Ruby as AWK!
alias rawk='ruby -lane' # => awk
alias rawk,='ruby -F, -lane' # => awk -F,
alias rawk:='ruby -F: -lane' # => awk -F:
alias rawkt='ruby -F"\t" -lane'
alias rawks='ruby -F"\s+" -lane'
alias mv='mv -i'
alias cp='cp -iv'
alias mostusedcomms="history | awk '{CMD[\$2]++;count++;}END { for (a in CMD)print CMD[a] \" \" CMD[a]/count*100 \"% \" a;}' | grep -v \"./\" | column -c3 -s \" \" -t | sort -nr | nl | head -n20"
# coding and gitting
alias be='bundle exec'
alias s='clear; git status'
push_branch() {
branch=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
git push $1 $branch
}
pull_branch() {
branch=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
git pull $1 $branch
}
autoload push_branch
autoload pull_branch
alias gpo='git push origin'
alias gpom='git push origin master'
alias gpob='push_branch origin'
alias gfo='git fetch origin'
alias gfu='git fetch upstream'
alias gfot='git fetch origin --tags'
alias gfut='git fetch upstream --tags'
alias gpot='git push origin --tags'
alias gput='git push upstream --tags'
alias gpu='git push upstream'
alias gpum='git push upstream master'
alias gpub='push_branch upstream'
alias glo='git pull origin'
alias glom='git pull origin master'
alias glob='pull_branch origin'
alias glum='git pull upstream master'
alias glub='pull_branch upstream'
alias gadd='git add'
# file [de]compressing
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
pswatch () {
watch -n1 "ps aux | head -n1 && ps aux | grep '$1' | grep -v 'grep'"
}
cs () {
cd $1;
if [ $? -eq 0 ]; then # If dir exists!
if [ `ls | wc -l` -ge 15 ]; then
ls --color=auto --group-directories-first;
else
ls -lh --color=auto --group-directories-first;
fi
fi
}
# _cs() {
# local cur opts
# cur="${COMP_WORDS[COMP_CWORD]}"
# opts=$(cd $1; ls -d */. | sed 's|/./||')
# COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
# }
compdef cs=cd
backup () {
newname=$1.`date +%Y%m%d.%H%M.bak`;
mv $1 $newname;
echo "-> Backed up to '$newname'";
cp -p $newname $1;
}
# 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"
# 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 ruby)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
export PATH=$PATH:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
# Some bio utils from different suites
export PATH=$HOME/bio/ViennaRNA-2.1.9/Utils:$PATH
export PATH=$HOME/bio/RNAz-2.1/perl:$PATH
export PATH=$HOME/bio/ncbi-blast-2.2.30+/bin:$PATH
export PATH=$HOME/usr/bin:$PATH
export PATH=$HOME/bin:$PATH
export PATH=$HOME/repos/stem-loop/bin:$HOME/repos/stem-loop/StemLoop/bin:$PATH
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export EDITOR=vim
export PYTHONSTARTUP=$HOME/.pythonrc
export BLASTDB="/home/juan/bio/ncbi-blast-2.2.30+/db"
# This is needed for VCFTtools:
export PERL5LIB=/path/to/your/vcftools-directory/src/perl/
export PATH=/home/juan/miniconda3/bin:/home/juan/.bin:$PATH
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
# added by Anaconda3 2.4.1 installer
export PATH="/home/juan/anaconda3/bin:$PATH"