-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
287 lines (249 loc) · 9.33 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
#
# █▄
# ███▄
# ███▀█▄
# ███ ▀█▄ █
# ███ ███ █ ▄ ▄▄▄
# ███ ███ ▄█▄ █ █ ▄█▄ ▄█▀ ▀▀
# ███ ███ ▄█▀ ▀█▄ ▀█▀ ▄▄▄█ ▀ ▄█▀ ▀█▄ ▀█▄▄
# ███ ███ ▄██▄ ▄██▄ █▄ █ █ █ ▄██▄ ▄██▄ ▀█▄
# ███ ███ █ ▄▄▄▄▄▄▄█▀
# ███ ███
# ███ █▀ ▒███████▒ ██████ ██░ ██
# ███ ▒ ▒ ▒ ▄▀░▒██ ▒ ▓██░ ██▒
# ███ ░ ▒ ▄▀▒░ ░ ▓██▄ ▒██▀▀██░
# █▀ ▄▀▒ ░ ▒ ██▒░▓█ ░██
# ▒███████▒▒██████▒▒░▓█▒░██▓
# ░▒▒ ▓░▒░▒▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒
# ░░▒ ▒ ░ ▒░ ░▒ ░ ░ ▒ ░▒░ ░
# ░ ░ ░ ░ ░░ ░ ░ ░ ░░ ░
# ░ ░ ░ ░ ░ ░
# ████████████████
# ██ ◖COMPLETION◗ ██
# ████████████████
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ completion setttings ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
#
unsetopt menu_complete
unsetopt flowcontrol
setopt auto_menu
zstyle 'completion:*' menu select
setopt complete_in_word
setopt always_to_end
setopt extendedglob
#▁▁▁▁▁▁▁▁▁▁▁▁
#▌ compleat ▐
#▔▔▔▔▔▔▔▔▔▔▔▔
autoload -Uz compinit && compinit
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit -d;
else
compinit -C;
fi;
# █████████████
# ██ ◖HISTORY◗ ██
# █████████████
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ file configuration ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
HISTSIZE=50000
SAVEHIST=10000
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ command configuration ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_ignore_space
setopt hist_verify
setopt inc_append_history
setopt share_history
# ██████████████
# ██ ◖PROMPT◗ ██
# ██████████████
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ spaceship settings ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
export SPACESHIP_PROMPT_DEFAULT_PREFIX="d"
export SPACESHIP_VI_MODE_SHOW=true
export SPACESHIP_PROMPT_FIRST_PREFIX_SHOW=false
export SPACESHIP_NODE_SHOW=true
export SPACESHIP_CHAR_SYMBOL="λ "
export SPACESHIP_DIR_TRUNC_REPO=true
export SPACESHIP_DIR_TRUNC_PREFIX=""
export SPACESHIP_HOST_SHOW=true
export SPACESHIP_HOST_SHOW_FULL=false
export SPACESHIP_TIME_SHOW=false
export SPACESHIP_BATTERY_SHOW=false
export SPACESHIP_EXEC_TIME_SHOW=true
export SPACESHIP_ASYNC_SHOW=false
# █████████████
# ██ ◖ALIASES◗ ██
# █████████████
#
alias sudo="/usr/bin/doas"
alias sudoedit='doas rnano'
alias g="git"
alias r="ranger"
alias rlf="lfub"
alias latexmk="latex-mk"
alias lf="lfub"
alias v="nvim"
alias c="cd"
alias l="eza"
alias y="paru"
alias m="man"
alias t="tig"
alias k="killall"
alias gr="rg --pretty --color=always"
alias zt="zathura"
alias yt="ytfzf -t"
alias ip='ip -color=always'
alias disk="dfc"
alias aic="ascii-image-converter"
alias mpp='echo "Matija Potočnik Pribošič" | ccopy'
alias lsf="ls -d */"
alias gemini="amfora"
alias rtorrent="cd /home/nathias/Downloads/torrents && rtorrent"
alias tr="cd /home/nathias/Downloads/torrents && rtorrent"
alias torrent="cd /home/nathias/Downloads/torrents && rtorrent"
alias sub="subliminal download -l en"
alias art="sacad"
alias weather="curl wttr.in"
alias clean="cd /home/nathias/Downloads/ && mv *.torrent torrents; mv *.pdf /home/nathias/Library/; mv *.txt /home/nathias/Library; mv *.epub /home/nathias/Library; mv *.doc /home/nathias/Library; mv *.docx /home/nathias/Library; mv *.cbr /home/nathias/Library; mv *.cbz /home/nathias/Library; mv *.png images; mv *.jpg images; mv *.svg images; mv *.gif images; mv *.bmp images; mv *.webp images; mv *.jpeg images; rm *.meta; rm *.mkv; echo 'Download cleanup complete'; ls"
alias xbig="xrandr --output eDP-1 --mode 1600x900 --rate 60"
alias xsmall="xrandr --output eDP-1 --mode 2560x1440 --rate 60"
alias thinkpad="sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"
alias tsh="/home/nathias/Scripts/tsh/t.sh"
alias parrot="curl parrot.live"
alias unix="curl -sL git.io/unix"
alias ping="prettyping --nolegend"
alias ccat="pygmentize"
alias bat="bat --theme TwoDark"
alias zspeed="time zsh -i -c exit"
alias nathias="/home/nathias/Scripts/nathias.sh"
alias ns="/home/nathias/Scripts/ns.sh"
alias nths="clear && cat /home/nathias/Ascii/nathiasASCII.ascii | lolcat"
alias haskell="ghci"
alias ls="ls --color=auto"
alias ncdu="ncdu --color dark"
alias anti="antibody bundle < ~/.zsh_plugins.txt > ~/.zsh_plugins.sh"
alias diff="diff --color=auto"
alias tree="eza -TRL 3"
alias roots=" eza -D -TRL 500"
alias bpy="bpython -q"
alias fn="firefox"
alias reddit="rtv --enable-media"
alias twitch="twitch-curses"
alias twitter="turses"
alias email="neomutt"
#alias feh='feh -B \"#1c1c1c\"'
alias mpv='mpv'
alias scrot="scrot /home/nathias/Pictures/Screenshots/%b%d_%H%M%S.png -d 5"
alias youtube="mpsyt"
# copy to clipboard, ctrl+c, ctrl+shift+c
alias ccopy='xclip -selection clipboard'
# paste from clipboard, ctrl+v, ctrl+shift+v
alias ppaste='xclip -selection clipboard -o'
# paste from highlight, middle click, shift+insert
alias sselect='xclip -selection primary -o'
alias awsx="source _awsx"
alias remixfix="lsof -i :8002"
alias jackfix="sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0"
alias subnet="$HOME/go/bin/subnet-cli"
alias neovim="nvim"
alias snow="xsnow"
alias prepare="gopreload-prepare"
alias b="bun"
# ████████████
# ██ ◖COLORS◗ ██
# ████████████
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ manpage colors ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
export MANPAGER='nvim +Man!'
export LESS="-ismWXr"
export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;33m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;4;34m'
export LESS_TERMCAP_us=$'\E[04;33;146m'
# use colors in less
export LESS=-Xr
#▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ ls colors ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔
eval $(dircolors -b $HOME/.dircolors)
#▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁
#▌ completion colors ▐
#▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
# ███████████████
# ██ ◖SOURCERY◗ ██
# ███████████████
export EDITOR="nvim"
export VISUAL="nvim"
export BROWSER="firefox"
export BROWSERCLI=w3m
source /usr/share/gdb
source ~/.zsh_plugins.sh
source /usr/share/gdb
export PATH="$PATH":"$HOME/.emacs.d/bin"
export PATH="$PATH:$HOME/.cargo/bin"
export PATH="$HOME/Scripts:$PATH"
export PATH=/home/nathias/.local/bin:$PATH
export SSH_KEY_PATH="~/.ssh/rsa_id"
export BROWSERCLI=w3m
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# z
eval "$(zoxide init zsh)"
# fnm
export PATH=/home/nathias/.fnm:$PATH
eval "`fnm env --multi`"
export AWS_REGION="eu-west-1"
export PATH="/home/nathias/.local/share/solana/install/active_release/bin:$PATH"
eval "$(direnv hook zsh)"
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
exec startx
fi
# diffc - diff commands
# - allows to call as: diffc 'command one' 'command two'
# instead of: diff <(command one) <(command two)
# (Just to save typing a few characters. Lol I'm a lazy programmer)
function diffc () {
if [[ "$#" != "2" ]]; then
echo "diffc requires two arguments"
return 1
fi
local command=$(printf 'diff <( %s ) <( %s )' "$1" "$2")
echo $command
eval $command
}
# diffh - diff history
# - make a diff of the output of the last two commands in the shell history
function diffh () {
# first one is 2nd to last. second is last
# remove preceeding spaces
local first=$(fc -ln -2 -2)
local second=$(fc -ln -1 -1)
# print and run diff
local command=$(printf 'diff <( %s ) <( %s )' "${first}" "${second}")
echo $command
eval $command
local error_code=$?
# replace this 'diffh' entry in history with the command
history -s "$(echo $command)"
return $error_code
}
# pnpm
export PNPM_HOME="/home/nathias/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
source /etc/profile.d/google-cloud-cli.sh