-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
71 lines (58 loc) · 1.55 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
HISTFILE=~/.histfile
HISTSIZE=10000000000
SAVEHIST=10000000000
setopt HIST_FIND_NO_DUPS
setopt INC_APPEND_HISTORY
for file in ~/.zsh/**/*.zsh;source "$file"
[[ $(uname) = "Darwin" ]] && darwin=1
zstyle :compinstall filename '~/.zshrc'
d="$HOME/.zsh/dircolors"
if (( $+commands[dircolors] ))
then eval "$(dircolors $d)"
elif (( $+commands[gdircolors] ))
then eval "$(gdircolors $d)"
fi
autoload -Uz compinit promptinit complist
compinit
promptinit
prompt spaceship
if [[ -v darwin ]]
then plugind="/usr/local/share"
else plugind="/usr/share/zsh/plugins"
fi
source "$plugind/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
source "$plugind/zsh-autosuggestions/zsh-autosuggestions.zsh"
if [[ ! -v darwin ]]
then
source /usr/share/doc/pkgfile/command-not-found.zsh
source /usr/share/nvm/init-nvm.sh
alias printsrcinfo='makepkg --printsrcinfo > .SRCINFO'
alias ls='ls --color=auto'
alias diff='diff --color=auto'
fi
alias grep='grep --color=auto'
alias icat='kitty +kitten icat'
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}
nv() {
__NV_PRIME_RENDER_OFFLOAD='1' \
__GLX_VENDOR_LIBRARY_NAME="nvidia" \
__VK_LAYER_NV_optimus="NVIDIA_only" \
command "$@"
}
export SPACESHIP_PROMPT_ADD_NEWLINE=false
export EDITOR="nano"
# Window title
precmd () {
vcs_info
print -Pn "\e]0;%n@%M\a"
}
preexec () { print -Pn "\e]0;$1\a" }
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"