-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
297 lines (256 loc) · 11.4 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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# The following lines were added by compinstall
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _list _oldlist _expand _complete _ignored _match _correct _approximate _prefix _yaourt
zstyle ':completion:*' completions 1
zstyle ':completion:*' condition 0
zstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' glob 1
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous false
#zstyle ':completion:*' list-colors ''
#zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '+' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+r:|[._-]=* r:|=*' '+l:|=* r:|=*'
zstyle ':completion:*' max-errors 2 numeric
zstyle ':completion:*' menu select=1
zstyle ':completion:*' original true
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' substitute 1
zstyle ':completion:*' verbose true
zstyle :compinstall filename '/home/daniel/.zshrc'
#Aliases
alias lb='ls++'
alias le='ls++ -A'
alias sl='noglob sl'
alias lsi='LS_COLORS=$(python2 $HOME/.local/bin/ls_colors_generator) ls-i --color=auto'
alias diri='LS_COLORS=$(python2 $HOME/.local/bin/ls_colors_generator) dir-i --color=auto'
alias vdiri='LS_COLORS=$(python2 $HOME/.local/bin/ls_colors_generator) vdir-i --color=auto'
alias palf='pikaur -Ql'
#alias paclf='pacman -Ql'
alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
alias svim='sudo -E nvim'
alias vim="nvim"
alias pacconf='pacman -C' # Fix all configuration files with vimdiff
alias pacupg='sudo pacman -Syu' # Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system.
alias pacin='sudo pacman -S' # Install specific package(s) from the repositories
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias pacrem='sudo pacman -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias pacrep='pacman -Si' # Display information about a given package in the repositories
alias pacreps='pacman -Ss' # Search for package(s) in the repositories
alias pacloc='pacman -Qi' # Display information about a given package in the local database
alias paclocs='pacman -Qs' # Search for package(s) in the local database
alias paclst='pacman -Qe' # List installed packages, even those installed from AUR (they're tagged as "local")
alias pacorph='pacman -Qtd' # Remove orphans using trourt
#alias aurin='aur sync --no-view'
#alias aurupg='aur sync --no-view -u'
#alias aurreps='aur search'
#alias aurpkg='aur build -u custom'
#alias aurrem='repoctl remove'
alias paconf='pikaur -C' # Fix all configuration files with vimdiff
alias paupg='pikaur -Syu' # Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system.
alias pain='pikaur -S' # Install specific package(s) from the repositories
alias pains='pikaur -U' # Install specific package not from the repositories but from a file
alias pare='pikaur -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias parem='pikaur -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias parep='pikaur -Si' # Display information about a given package in the repositories
alias pareps='pikaur -Ss' # Search for package(s) in the repositories
alias paloc='pikaur -Qi' # Display information about a given package in the local database
alias palocs='pikaur -Qs' # Search for package(s) in the local database
alias palst='pikaur -Qe' # List installed packages, even those installed from AUR (they're tagged as "local")
alias paorph='pikaur -Qtd' # Remove orphans using yaourt
user_commands=(
list-units is-active status show help list-unit-files
is-enabled list-jobs show-environment cat list-timers
start stop reload restart try-restart isolate kill
reset-failed enable disable reenable preset mask unmask
link load cancel set-environment unset-environment
edit)
for c in $user_commands; do; alias scu-$c="systemctl --user $c"; done
alias scu-enable-now="scu-enable --now"
alias scu-disable-now="scu-disable --now"
alias scu-mask-now="scu-mask --now"
alias scu-daemon-reload="systemctl --user daemon-reload"
#Variables
export SSH_ASKPASS="/usr/bin/ksshaskpass"
export EDITOR="nvim"
export PATH="$(cope_path):/usr/lib/cw:$PATH:/opt/anaconda/bin"
export CCACHE_PATH="/usr/bin"
export TERM=konsole-256color
export SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
export ENHANCD_COMMAND=ecd
export R_MAX_NUM_DLLS=500
export MANPAGER="nvim -c 'set ft=man' -"
export XDG_CACHE_HOME="$HOME/.cache"
#export PATH="/usr/lib/colorgcc/bin/:$PATH"
#Base16
#BASE16_SHELL=$HOME/.config/base16-shell/
#[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"
#source $HOME/.config/bspwm/base16-tomorrow-night.sh
source "$HOME/.zplug/init.zsh"
#Prezto
zplug "modules/environment", from:prezto
zplug "modules/terminal", from:prezto
zplug "modules/editor", from:prezto
zplug "modules/history", from:prezto
zplug "modules/directory", from:prezto
zplug "modules/spectrum", from:prezto
zplug "modules/utility", from:prezto
zplug "modules/completion", from:prezto
zplug "modules/prompt", from:prezto
zstyle ':prezto:*:*' color 'yes'
#Prezto extra
zplug "modules/helper", from:prezto
zplug "modules/ocaml", from:prezto
zplug "modules/perl", from:prezto
zplug "modules/python", from:prezto
zplug "modules/rsync", from:prezto
zplug "modules/ruby", from:prezto
#zplug "modules/archive", from:prezto broken
#zplug "modules/git", from:prezto broken
#zplug "modules/ssh", from:prezto
#zplug "modules/tmux", from:prezto
#Colors
zplug "plugins/colorize", from:oh-my-zsh
zplug "plugins/colored-man", from:oh-my-zsh
#zplug "plugins/catimg" from:oh-my-zsh
#zplug "plugins/command-not-found" from:oh-my-zsh
#Copy
zplug "plugins/copydir", from:oh-my-zsh
zplug "plugins/copyfile", from:oh-my-zsh
zplug "plugins/cp", from:oh-my-zsh
zplug "plugins/rsync", from:oh-my-zsh
#Perl
zplug "plugins/cpanm", from:oh-my-zsh, lazy:true
zplug "plugins/perl", from:oh-my-zsh, from:oh-my-zsh
#Directories
zplug "b4b4r07/enhancd", use:init.sh
zplug "plugins/dircycle", from:oh-my-zsh
zplug "plugins/dirhistory", from:oh-my-zsh
zplug "plugins/jump", from:oh-my-zsh
zplug "plugins/wd", from:oh-my-zsh
zplug "plugins/z", from:oh-my-zsh
zplug "psprint/zsh-navigation-tools"
zplug "Tarrasch/zsh-bd"
#zplug "plugins/fasd", from:oh-my-zsh
#Archive
zplug "plugins/extract", from:oh-my-zsh
#Git
zplug "plugins/git", from:oh-my-zsh
#Go
zplug "plugins/golang", from:oh-my-zsh, lazy:true
#Haskell
zplug "plugins/cabal", from:oh-my-zsh, lazy:true
#History
zplug "plugins/history-substring-search", from:oh-my-zsh
zplug "plugins/history", from:oh-my-zsh
zplug "psprint/history-search-multi-word"
zplug "tarruda/zsh-autosuggestions"
#Python
zplug "plugins/pep8", from:oh-my-zsh
zplug "plugins/python", from:oh-my-zsh
zplug "plugins/pip", from:oh-my-zsh
zplug "plugins/pyenv", from:oh-my-zsh
zplug "plugins/virtualenv", from:oh-my-zsh, lazy:true
#zplug oh-my-zsh "plugins/pylinst"
#zplug, from:oh-my-zsh "plugins/virtualenvwrapper"
#Miscellaneous
zplug "bhilburn/powerlevel9k"
zplug "djui/alias-tips"
zplug "hchbaw/zce.zsh"
zplug "jimmijj/zsh-syntax-highlighting"
zplug "jreese/zsh-titles"
zplug "mafredri/zsh-async", lazy:true
zplug "plugins/catimg", from:oh-my-zsh, lazy:true
zplug "plugins/taskwarrior", from:oh-my-zsh, lazy:true
zplug "plugins/themes", from:oh-my-zsh, lazy:true
zplug "plugins/kate", from:oh-my-zsh
#zplug "plugins/vi-mode", from:oh-my-zsh
zplug "plugins/zsh_reload", from:oh-my-zsh
zplug "psprint/zsnapshot"
zplug "psprint/ztrace"
zplug "Tarrasch/zsh-functional"
zplug "vifon/deer", lazy:true
zplug "willghatch/zsh-snippets"
zplug "zsh-users/zaw"
#zplug "joel-porquet/zsh-dircolors-solarized"
#zplug "Valiev/almostontop"
#zplug, from:oh-my-zsh "plugins/safe-paste"
#zplug oh-my-zsh "plugins/web-search"
#zplug "joepvd/grep2awk", nice:10
#zplug load" Angelmmiguel/pm"
#zplug load" marzocchi/zsh-notify"
#System
#zplug "plugins/archlinux", from:oh-my-zsh
zplug "plugins/systemadmin", from:oh-my-zsh
zplug "plugins/systemd", from:oh-my-zsh
zplug "plugins/sudo", from:oh-my-zsh
#Tmux
zplug "plugins/tmux", from:oh-my-zsh
zplug "plugins/tmuxinator", from:oh-my-zsh
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load
#Autosuggest
bindkey '^f' forward-word
bindkey '^b' backward-word
bindkey '^e' end-of-line
bindkey '^P' history-substring-search-up
bindkey '^N' history-substring-search-down
ZSH_AUTOSUGGEST_USE_ASYNC=true
#Dircolors
#setupsolarized dircolors.256dark
#Fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# PM functions
source ~/.pm/pm.zsh
alias pma="pm add"
alias pmg="pm go"
alias pmrm="pm remove"
alias pml="pm list"
# end PM
#Powerlevel
POWERLEVEL9K_MODE='nerdfont-complete'
#POWERLEVEL9K_COLOR_SCHEME="light"
POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND="000"
POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND="002"
#POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="011"
#POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="007"
#POWERLEVEL9K_DIR_HOME_FOREGROUND="011"
#POWERLEVEL9K_DIR_HOME_BACKGROUND="007"
#POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="011"
#POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="007"
#POWERLEVEL9K_STATUS_OK_FOREGROUND="035"
#POWERLEVEL9K_STATUS_OK_BACKGROUND="007"
#POWERLEVEL9K_VCS_MODIFIED_FOREGROUND="007"
#POWERLEVEL9K_VCS_MODIFIED_FOREGROUND="007"
#POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND="035"
#POWERLEVEL9K_VCS_CLEAN_BACKGROUND="035"
POWERLEVEL9K_CONTEXT_BOLD=true
POWERLEVEL9K_DIR_BOLD=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_SHORTEN_DELIMITER=""
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right"
POWERLEVEL9K_BACKGROUND_JOBS_BOLD=true
POWERLEVEL9K_ROOT_INDICATOR_BOLD=true
POWERLEVEL9K_HISTORY_BOLD=true
POWERLEVEL9K_VCS_BOLD=true
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs vcs)
#Prezto
#zstyle ':prezto:module:editor' key-bindings 'vi'
#Powerlevel
source ".zplug/repos/bhilburn/powerlevel9k/powerlevel9k.zsh-theme"
#Powerline
#if [ ! $(pgrep powerline-daemo) ]; then
#powerline-daemon
#fi
#. /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh
#SSH
eval $(keychain --eval --quiet ~/.ssh/id_hoffman2 ~/.ssh/id_orion ~/.ssh/id_rsa_icnn ~/.ssh/coppolab ~/.ssh/mistachie777)