forked from kragniz/dot-files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
134 lines (109 loc) · 3.58 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
# Initialize colors.
autoload -U colors; colors
autoload -U compinit; compinit
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.history
# Allow for functions in the prompt.
setopt PROMPT_SUBST
setopt automenu
setopt correct
setopt histignorealldups
# Autoload zsh functions.
fpath=(~/.zsh/functions $fpath)
autoload -U ~/.zsh/functions/*(:t)
# Enable auto-execution of functions.
typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
# Append git functions needed for prompt.
preexec_functions+='preexec_update_git_vars'
precmd_functions+='precmd_update_git_vars'
chpwd_functions+='chpwd_update_git_vars'
# Set the prompt.
PROMPT=$'┌──[%{$fg[cyan]%}%n@%m%{$reset_color%}]-[%{${fg[magenta]}%}%B%~%b]$(prompt_git_info)%{${fg[default]}%}\n└─\$ '
PROMPT2="%{"$'\e[1A'"├"$'\e[1B\e[1D'"%}\
└─%_─>"
#awesome less
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
alias ls='ls --color'
alias cd..='cd ..'
alias grep='grep --color'
alias diff='colordiff'
alias tmux='tmux -2'
alias fact="links -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|"
alias hibernate="systemctl hibernate"
alias skype='xhost +local: && su skype -c skype'
alias v='f -e vim' # quick opening files with vim
alias m='f -e mplayer' # quick opening files with mplayer
alias o='a -e xdg-open' # quick opening files with xdg-open
alias git='hub'
alias clj='rlwrap clj'
GRC=`which grc`
if [ "$TERM" != dumb ] && [ -n GRC ]
then
alias colourify="$GRC -es --colour=auto"
#alias configure='colourify ./configure'
#alias diff='colourify diff'
#alias make='colourify make'
#alias gcc='colourify gcc'
#alias g++='colourify g++'
#alias as='colourify as'
#alias gas='colourify gas'
#alias ld='colourify ld'
#alias netstat='colourify netstat'
#alias ping='colourify ping'
#alias traceroute='colourify /usr/sbin/traceroute'
fi
#bindkey -v
if [ "$TERM" = "linux" ]; then
setfont /usr/share/kbd/consolefonts/ter-112n.psf.gz
#echo -en "\e]P01C1C1C" # 0
echo -en "\e]P02D2D2D" # 0
echo -en "\e]P83D3A3A" # 8
echo -en "\e]P1D74B73" # 1
echo -en "\e]P9B94062" # 9
echo -en "\e]P29ACC79" # 2
echo -en "\e]PA8FB676" # 10
echo -en "\e]P3D0D26B" # 3
echo -en "\e]PBC8BC45" # 11
echo -en "\e]P477B6C5" # 4
echo -en "\e]PC8FA7B9" # 12
echo -en "\e]P5A488D9" # 5
echo -en "\e]PD8888A1" # 13
echo -en "\e]P67FCAB3" # 6
echo -en "\e]PE6EC2A8" # 14
echo -en "\e]P7B5B5B5" # 7
echo -en "\e]PFDAD3D3" # 15
tmux new
fi
# key bindings
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[5~" beginning-of-history
bindkey "\e[6~" end-of-history
bindkey "\e[3~" delete-char
bindkey "\e[2~" quoted-insert
bindkey "\e[5C" forward-word
bindkey "\eOc" emacs-forward-word
bindkey "\e[5D" backward-word
bindkey "\eOd" emacs-backward-word
bindkey "\e\e[C" forward-word
bindkey "\e\e[D" backward-word
bindkey "^H" backward-delete-word
# for rxvt
bindkey "\e[8~" end-of-line
bindkey "\e[7~" beginning-of-line
# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
# completion in the middle of a line
bindkey '^i' expand-or-complete-prefix
export EDITOR='vim'
export BROWSER='/usr/bin/google-chrome'
export GOPATH='/home/jonathan/go'
export PATH=$PATH:/home/jonathan/.gem/ruby/1.9.1/bin:/opt/clojurescript/bin/:/root/.gem/ruby/1.9.1/bin:/home/jonathan/x-tools/arm-unknown-eabi/bin
export PKG_CONFIG_PATH=/usr/lib/pkgconfig