-
Notifications
You must be signed in to change notification settings - Fork 4
/
.zshrc
148 lines (106 loc) · 2.87 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
source $HOME/.bashrc
export GPG_TTY=$(tty)
export LANG=en_AU.UTF-8
export LC_ALL=en_AU.UTF-8
export GPG_TTY=$(tty)
# Start ssh-agent so that I can call ssh-add
if type "ssh-agent" > /dev/null; then
eval $(ssh-agent) > /dev/null
else
echo "warning: ssh-agent not started"
fi
USER="bennett"
DEFAULT_USER=`whoami`
ZSH_CUSTOM="$HOME/.config/zsh-custom"
if [ -d "$HOME/.oh-my-zsh" ]; then
ZSH=$HOME/.oh-my-zsh
else
ZSH=/usr/share/oh-my-zsh/
fi
ZSH_THEME="gitster"
DISABLE_AUTO_UPDATE="true"
export EDITOR="nvim"
export VISUAL="nvim"
export SHELL="/usr/bin/zsh"
safe_source() {
if [ -f "$1" ]; then
source $1
fi
}
ZSH_CACHE_DIR=$HOME/.cache/oh-my-zsh
if [[ ! -d $ZSH_CACHE_DIR ]]; then
mkdir -p $ZSH_CACHE_DIR
fi
safe_source $ZSH/oh-my-zsh.sh
safe_source /opt/miniconda3/etc/profile.d/conda.sh
export WORKON_HOME=~/.virtualenvs
safe_source /usr/bin/virtualenvwrapper_lazy.sh
export PATH="/usr/lib:/usr/bin:/bin"
export PATH="$HOME/.yarn/bin:$PATH"
safe_source /home/bennett/.ghcup/env
export PNPM_HOME="/home/bennett/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
export N_PREFIX="$HOME/.n/"
export PATH="$N_PREFIX/bin:$PATH"
safe_source /home/bennett/.cargo/env
safe_source /home/bennett/.asdf/asdf.sh
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export NPM_TOKEN=${NPM_TOKEN:-""}
stty -ixon
export CHROME_BIN=chromium
export NODE_OPTIONS=--max_old_space_size=16384
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion history)
AUTO_SUGGEST=/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
if [ -f "$AUTO_SUGGEST" ]
then
source $AUTO_SUGGEST
else
safe_source "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
fpath+=~/.zfunc
if type "compinit" > /dev/null; then
compinit -C
fi
if type "zoxide" > /dev/null; then
eval "$(zoxide init zsh)"
fi
# export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export PIPEWIRE_LATENCY="256/48000"
export GTK_THEME="Gruvbox"
export BROWSER="open-link"
# If this is started from tty1 then start X. This is a way to get around having
# a greeter. This should be the last thing to load so programs launched from i3
# have the correct PATH / environment variables set.
if [ "$(tty)" = "/dev/tty1" ]; then
if false; then
exit 1
elif type "Hyprland" > /dev/null; then
export XDG_CURRENT_DESKTOP=hyprland
export MOZ_ENABLE_WAYLAND=1
export ANKI_WAYLAND=1
Hyprland 2> /tmp/hyprland.log
exit 0
elif type "sway" > /dev/null; then
export XDG_CURRENT_DESKTOP=sway
export MOZ_ENABLE_WAYLAND=1
export ANKI_WAYLAND=1
sway -d 2> /tmp/sway.log
exit 0
elif type "sx" > /dev/null; then
sx
exit 0
else
echo "warning: sx is not installed"
fi
fi
# Anything following this will only be sourced by shells
# Aliases
alias ..="cd .."
alias ...="cd ../../"
alias ....="cd ../../../"
uzip() {
unzip $1 -d ${1%.zip}
}