-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc.tmpl
142 lines (107 loc) · 3.14 KB
/
dot_zshrc.tmpl
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
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ENABLE_CORRECTION="true"
export EDITOR="nvim"
export TERM="xterm-256color"
export term="xterm-256color"
# alias'
alias ll="ls -lah"
alias la="ls -laAh"
alias up="cd .."
alias cls="clear"
if [[ -x "$(command -v paru)" ]]; then
alias steal="paru -S"
alias update="paru -Syu"
elif [[ -x "$(command -v apt)" ]]; then
alias steal="sudo apt install"
alias update='sudo apt update -y && sudo apt upgrade'
fi
if [[ -x "$(command -v nmcli)" ]]; then
alias connect="nmcli device wifi connect"
fi
alias info="info --vi-keys"
if [[ -x "$(command -v ncspot)" ]]; then
alias spotify="ncspot"
fi
plugins=(git)
source $ZSH/oh-my-zsh.sh
# exports
if [[ -d "$HOME/.local/bin" ]]; then
export PATH="$PATH:$HOME/.local/bin"
fi
if [[ -d "$HOME/bin" ]]; then
export PATH="$PATH:$HOME/bin"
fi
export PATH="$PATH:/usr/local/"
if [[ -d "$HOME/.emacs.d/bin" ]]; then
export PATH="$HOME/.emacs.d/bin:$PATH"
fi
if [[ -d "$HOME/.cargo/bin" ]]; then
export PATH="$PATH:$HOME/.cargo/bin"
fi
if [[ -d "$HOME/.config/emacs/bin" ]]; then
export PATH="$PATH:$HOME/.config/emacs/bin"
fi
#export PATH="$PATH:/usr/local/go/bin"
#export PATH="$PATH:$HOME/go/bin"
#export PATH="$PATH:$HOME/go/bin" # This is to satisfy some tools that i installed before i used go with asdf
if [[ -d "/usr/local/bin/idea-IU-213.6461.79/bin" ]]; then
export PATH="$PATH:/usr/local/bin/idea-IU-213.6461.79/bin"
fi
# java stuff for trexo
if [[ -d "/usr/lib/jvm/graalvm-ce-java17-22.0.0.2/bin" ]]; then
export PATH="/usr/lib/jvm/graalvm-ce-java17-22.0.0.2/bin:$PATH"
fi
# java stuff for trexo
if [[ -d "/usr/lib/jvm/graalvm-ce-java17-22.0.0.2" ]]; then
export JAVA_HOME="/usr/lib/jvm/graalvm-ce-java17-22.0.0.2"
fi
# spicetify
if [[ -d "$HOME/spicetify-cli" ]]; then
export SPICETIFY_INSTALL="$HOME/spicetify-cli"
export PATH="$SPICETIFY_INSTALL:$PATH"
fi
if [[ -d "$HOME/scripts" ]]; then
export PATH="$PATH:$HOME/scripts"
fi
# homebrew
if [[ -d "/opt/homebrew/bin" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# macports
if [[ -d "/opt/local/bin" ]]; then
export PATH="$PATH:/opt/local/bin:/opt/local/sbin"
export MANPATH="/opt/local/share/man:$MANPATH"
fi
# this is to fix a stupid bug with gnome, gtk, and alacritty
# basically the top bar gets weird when using wayland
if [[ -z "${+XDG_SESSION_TYPE}" ]]; then
export WAYLAND_DISPLAY=alacritty
fi
if [[ -x "$(command -v rbenv)" ]]; then
eval "$(rbenv init -)"
fi
if [[ -a "$HOME/.asdf/asdf.sh" ]]; then
source $HOME/.asdf/asdf.sh
GOV=$(asdf where golang)
export GOROOT=$GOV/go
fi
if [[ -x "$(command -v go)" ]]; then
export PATH="$PATH:$(go env GOPATH)/bin"
export PATH="$PATH:$(go env GOROOT)/bin"
fi
if [[ -x "$(command -v rustc)" ]]; then
export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library
fi
if [[ -x "$(command -v starship)" ]]; then
eval "$(starship init zsh)"
fi
if [[ -x "$(command -v zoxide)" ]]; then
eval "$(zoxide init zsh)"
fi
alias asdfudo="sudo -E env \"PATH=$PATH"\"
# XDG
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"