6718c264ea250a7669a89d0dbbec1e89a72a3c1e
- Author
- TheEdgeOfRage <git@theedgeofrage.com>
- Committer
- TheEdgeOfRage <git@theedgeofrage.com>
- Date
Message
Fix zsh env loading and start gamescope on tty3
Diff
1diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl
2index 13ca24eb24c60d2865e75cd4c1b9708132ec1cee..dd797898c26fa9af3e5ff851d4c9f71ab1792462 100644
3--- a/dot_zshrc.tmpl
4+++ b/dot_zshrc.tmpl
5@@ -6,7 +6,7 @@ SAVEHIST=40000
6 HIST_STAMPS="yyyy-mm-dd"
7 setopt HIST_IGNORE_DUPS
8
9-set_env() {
10+if [ -z "${ZSH_ENV_SET}" ]; then
11 # CLI tools
12 export MAKEFLAGS="-j $(nproc --all)"
13 export LESS="-SRF --mouse"
14@@ -48,12 +48,14 @@ set_env() {
15 export PATH="$HOME/.local/bin:$PATH:$GOBIN:$HOME/.cargo/bin:$HOME/.local/share/nvim/mason/bin:$HOME/.cache/.bun/bin"
16 export XDG_CONFIG_HOME="$HOME/.config"
17 export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
18-{{ if and (hasKey . "zshrc") (kindIs "map" .zshrc) (hasKey .zshrc "env_vars") }}
19+
20 # Additional env vars
21-{{ range $_, $env := .zshrc.env_vars }} export {{ $env.name }}="{{ $env.value }}"
22-{{ end -}}
23-{{- end -}}
24-}
25+ export R2MOD_INSTALL_DIR="$HOME/games/steam/steamapps/common/Risk of Rain 2"
26+ export R2MOD_COMPAT_DIR="$HOME/games/steam/steamapps/compatdata/632360"
27+
28+ # Prevent zsh env vars from getting exported multiple times
29+ export ZSH_ENV_SET="1"
30+fi
31
32 # Custom functions and completions
33 CUSTOM="$HOME/.config/zsh"
34@@ -126,7 +128,7 @@ if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && [[ $(tty) = /dev/tt
35 # hyprland on tty1
36 set_env
37 exec uwsm start -e -D Hyprland hyprland.desktop
38-elif [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 2 ] && [[ $(tty) = /dev/tty2 ]]; then
39+elif [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 2 ] && [[ $(tty) = /dev/tty3 ]]; then
40 set_env
41 exec gamescope-session-plus steam
42 elif [[ $(tty) =~ "/dev/tty[0-9]" ]]; then