-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshenv
89 lines (77 loc) · 2.93 KB
/
zshenv
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
export GOPATH="$HOME/go"
export VOLTA_HOME="$HOME/.volta"
# Add a bunch of locations we use to the path. There are a bunch of weird
# caviats here.
#
# On macOS, for some reason, when we use a non-interactive shell /usr/local/bin
# and /usr/local/sbin (which are the default location for homebrew) don't get
# added to the path, so we force it here just in case. This fixes some oddities
# in Emacs.
#
# Most other changes make a bit more sense.
typeset -U path fpath
path=(
"$HOME/bin"
"/Applications/Ghostty.app/Contents/MacOS"
"/Applications/Inkscape.app/Contents/Resources/bin"
"/Applications/Postgres.app/Contents/Versions/latest/bin"
"/Applications/Sublime Text.app/Contents/SharedSupport/bin"
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
"$GOPATH/bin"
"$VOLTA_HOME/bin"
"$HOME/.config/emacs/bin"
"$HOME/.cargo/bin"
"$HOME/.emacs.d/bin"
"$HOME/.poetry/bin"
"$HOME/.pyenv/shims"
"$HOME/.rbenv/shims"
"$HOME/.rbenv/bin"
"$HOME/.local/bin"
/usr/local/opt/python/libexec/bin
/usr/local/bin
/usr/local/sbin
/opt/homebrew/bin
/opt/homebrew/sbin
$path
)
fpath=(
"$HOME/.config/belak/zsh"
/opt/homebrew/share/zsh/site-functions
$fpath
)
# Certain default applications
export ALTERNATE_EDITOR=""
export EDITOR=nvim
export PAGER=less
# Magic incantations
export WORKON_HOME="$HOME/.virtualenvs"
export DISABLE_AUTO_UPDATE=true
# It's frustrating that .pyc (and similar files) exist, so it's good that we can
# disable them. This makes python dev much less painful.
export PYTHONDONTWRITEBYTECODE=true
# Improve mouse input with Firefox on Linux
export MOZ_USE_XINPUT2=1
# Most toolkits don't actually scale properly to different DPIs. Alacritty is
# smart enough to do this, but it throws off font sizes, so we force the
# underlying windowing toolkit they use to return a scaling factor of 1.
export WINIT_X11_SCALE_FACTOR=1
# Currently, the default window decorations for the windowing toolkit Alacritty
# uses don't fit in at all. Unfortunately, until the proper Wayland protocol
# extension is implemented, the easiest way to fix this is to force the use of
# x11 in the underlying toolkit to trick it into relying on server-side decorations.
export WINIT_UNIX_BACKEND=x11
# We manually display the venv, so we don't want virtualenv doing that for us
export VIRTUAL_ENV_DISABLE_PROMPT=true
# Workaround for some SSH flags I use - they're deprecated on macOS for some
# reason, but this will fix the warning for now.
export APPLE_SSH_ADD_BEHAVIOR=openssh
# Load cargo env if available
if [[ -f "$HOME/.cargo/env" ]]; then source "$HOME/.cargo/env"; fi
# Load nix home-manager env if available
if [[ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]]; then
source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
fi
# On macOS the zshenv in /etc/static sets up the nix environment.
if [[ -f "/etc/static/zshenv" ]]; then
source "/etc/static/zshenv"
fi