-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
101 lines (79 loc) · 3.27 KB
/
dot_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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source ~/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle pip
antigen bundle python
antigen bundle git-auto-fetch
antigen bundle fzf
antigen bundle tmux
antigen bundle yarn
antigen bundle thefuck
antigen bundle virtualenv
antigen bundle safe-paste
antigen bundle archlinux
antigen bundle ag
antigen bundle z
#antigen bundle catppuccin/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle "MichaelAquilina/zsh-you-should-use"
antigen bundle "DarrinTisdale/zsh-aliases-exa"
antigen bundle lukechilds/zsh-nvm
#antigen theme agnoster
antigen theme romkatv/powerlevel10k
GIT_AUTO_FETCH_INTERVAL=120
ZSH_TMUX_AUTOSTART=false
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
NVM_AUTO_USE=true
antigen apply
source ~/.aliases
export EDITOR=/usr/bin/nvim
# PERL trash
PATH="/home/thomas/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/home/thomas/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/thomas/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/thomas/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/thomas/perl5"; export PERL_MM_OPT;
# More PATH fun
export PATH=$PATH:/home/thomas/.local/share/gem/ruby/3.0.0/bin
export PATH=$PATH:/usr/local/cuda/bin
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/bin:$PATH"
export LD_LIBRARY_PATH=/usr/local/cuda/lib
export FZF_DEFAULT_OPTS=" \
--color=bg+:#363a4f,bg:#24273a,spinner:#f4dbd6,hl:#ed8796 \
--color=fg:#cad3f5,header:#ed8796,info:#c6a0f6,pointer:#f4dbd6 \
--color=marker:#f4dbd6,fg+:#cad3f5,prompt:#c6a0f6,hl+:#ed8796"
#export QT_STYLE_OVERRIDE=adwaita
# stolen from https://github.com/JeffChien/dotfiles/blob/master/zsh/.oh-my-zsh/custom/plugins/ranger/ranger.plugin.zsh
ranger-cd () {
tempfile='/tmp/choosedir'
ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
rm -f -- "$tempfile"
}
bindkey -s "^o" 'ranger-cd^M'
# export PYENV_ROOT="$HOME/.pyenv"
# command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init -)"
# eval "$(pyenv virtualenv-init -)"
eval "$(uv generate-shell-completion zsh)"
fay() {
packages=$(awk {'print $1'} <<< $(yay -Ss $1 | awk 'NR%2 {printf "\033[1;32m%s \033[0;36m%s\033[0m — ",$1,$2;next;}{ print substr($0, 5, length($0) - 4); }' | fzf -m --ansi))
[ "$packages" ] && yay -S $(echo "$packages" | tr "\n" " ")
}
function gitignore() { curl -sLw "\n" https://www.toptal.com/developers/gitignore/api/$@ > .gitignore;}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
eval "$(uvx --generate-shell-completion zsh)"