-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.zprofile
70 lines (63 loc) · 1.84 KB
/
.zprofile
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
# 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 [ -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/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
if [ "$XDG_SESSION_OPT" = "potato" ]; then
# check if nvidia is installed
if ! [ -f "/usr/bin/nvidia-smi" ]; then
USE_HYPRLAND=1
fi
else
USE_HYPRLAND=1
fi
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
# start wayland compositor
exec $WM -c "$HYPRLAND_CONFIG"
else
# fallback to xorg
exec startx > /dev/null
fi
fi
fi