-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.zprofile
More file actions
80 lines (69 loc) · 2.09 KB
/
.zprofile
File metadata and controls
80 lines (69 loc) · 2.09 KB
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
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ]; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/.cargo/bin" ]; then
PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "$HOME/go/bin" ]; then
PATH="$HOME/go/bin:$PATH"
fi
export PNPM_HOME="$HOME/.local/share/pnpm"
PATH="$PNPM_HOME:$HOME/.node_modules/bin:$PATH"
# remove absolute path leaks in release binary (rust)
export RUSTFLAGS="--remap-path-prefix $HOME=~"
export XDG_SESSION_OPT=$(cat /etc/hostname)
export SESSION_CONF="$HOME/.config/$XDG_SESSION_OPT"
if [ -f "$HOME/.openai" ] ; then
# load OpenAI API key from file
export OPENAI_API_KEY=$(cat "$HOME/.openai")
fi
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CACHE_HOME=$HOME/.cache
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
fi
if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ]; then
# tty1, start GUI
if [ "$XDG_VTNR" -eq 1 ]; then
WM=/usr/bin/start-hyprland
if [ -f "$HOME/pets/Hyprland/build/src/Hyprland" ]; then
WM=$HOME/pets/Hyprland/build/src/Hyprland
export HYPRLAND_TRACE=1
export AQ_TRACE=1
fi
USE_HYPRLAND=0
if [ -f "$WM" ]; then
USE_HYPRLAND=1
fi
if [ "$USE_HYPRLAND" -eq 1 ]; then
HYPRLAND_CONFIG="$HOME/.config/hyprland/hyprland.conf"
export XDG_SESSION_TYPE="wayland"
# Log WLR errors and logs to the hyprland log
export HYPRLAND_LOG_WLR=1
# env variables for wayland
export MOZ_ENABLE_WAYLAND=1
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland-egl
export GDK_BACKEND=wayland,x11
export SDL_VIDEODRIVER=wayland
export XKB_DEFAULT_OPTIONS=caps:backspace
export GTK_THEME=Arc:dark
export ELECTRON_OZONE_PLATFORM_HINT=auto
if [ "$XDG_SESSION_OPT" = "vac" ]; then
export LIBVA_DRIVER_NAME=nvidia
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export NVD_BACKEND=direct
fi
# start wayland compositor
exec $WM -- -c "$HYPRLAND_CONFIG"
else
# fallback to xorg
# define fontconfig path for chromium
export FONTCONFIG_PATH=/etc/fonts
# start xorg
exec startx > /dev/null
fi
fi
fi