-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
155 lines (116 loc) · 3.89 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
# -------- oh-my-zsh stuff
# 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="agnoster"
# used by "agnoster" theme to hide user@host when logged in to default
DEFAULT_USER="stephen"
# instead of using a ZSH theme, use promptline:
# https://github.com/edkolev/promptline.vim
# source $HOME/.promptline.sh
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# 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 many often would you like to wait 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 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)
if [ -f "$HOME/.ssh/id_ecdsa" ]; then
plugins=(git ssh-agent)
zstyle :omz:plugins:ssh-agent identities id_ecdsa
else
plugins=(git)
fi
source $ZSH/oh-my-zsh.sh
# omg, stop the corrections
unsetopt correct_all
# -------- end oh-my-zsh stuff
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt appendhistory extendedglob nomatch notify incappendhistory extendedhistory
unsetopt autocd beep
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _correct _approximate
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'm:{a-z}={A-Z}' 'r:|[._-]=** r:|=** l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' original true
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle :compinstall filename '/home/stephen/.zshrc'
# End of lines added by compinstall
# no rogue bangs
setopt histverify
autoload -Uz compinit
compinit
# autoload -U promptinit
# promptinit
# prompt adam2
source /etc/environment
# high precedence PATH elements (element:$PATH)
PATH=$HOME/.bin:$PATH
PATH=$HOME/.local/bin:$PATH
PATH=$HOME/.npm-packages/bin:$PATH
PATH=$HOME/.cargo/bin:$PATH
PATH=/usr/lib/ccache:$PATH
# low precedence PATH elements ($PATH:element)
PATH=$PATH:/snap/bin
PATH=$PATH:/sbin
PATH=$PATH:/usr/sbin
export PATH
export EDITOR="/usr/bin/nvim"
export PAGER="nvim -R"
export MANPAGER='nvim +Man!'
export TERM=xterm-256color
if hash nvim; then
alias vim="nvim"
fi
if hash exa; then
alias ls="exa"
fi
if hash bat; then
alias cat="bat"
fi
if hash fd; then
alias find="fd"
fi
alias dc='cd'
alias no='ls'
alias on='ls'
# function to add local npm binaries to $PATH
npm_add_local_bin_to_path()
{
export PATH=$PATH:./node_modules/.bin
}
# tell QT5 how to find its theme
export QT_QPA_PLATFORMTHEME="qt6ct"
# set GPG_TTY so pinentry-tty will work
export GPG_TTY=$(tty)
# hack: setting GCC_COLORS fixes ccache issue where colors are stripped
# https://github.com/ccache/ccache/issues/224
export GCC_COLORS="error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01"
# set DOCKER_HOST to support rootless docker, see:
# https://wiki.archlinux.org/title/Docker#Rootless_Docker_daemon
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
# zoxide
# https://github.com/ajeetdsouza/zoxide
eval "$(zoxide init zsh)"