6a2f3424c3fe8849b0e8a0e88030d25e8fd3b6fe
- Author
- TheEdgeOfRage <git@theedgeofrage.com>
- Committer
- TheEdgeOfRage <git@theedgeofrage.com>
- Date
Message
Update zshrc and zprofile for wayland
Diff
1diff --git a/dot_zprofile.tmpl b/dot_zprofile.tmpl
2index 600918c2bc86f32ee40e748548fa0bd18eaf322e..73d97c25b3d28250530ae2e24f48ecf9f4983d64 100644
3--- a/dot_zprofile.tmpl
4+++ b/dot_zprofile.tmpl
5@@ -6,23 +6,27 @@ export LC_ALL="en_DK.UTF-8"
6 export MAKEFLAGS="-j $(nproc --all)"
7 export MOZ_WEBRENDER="1"
8 export MOZ_USE_XINPUT2="1"
9-export MOZ_ENABLE_WAYLAND="1"
10 export WLR_NO_HARDWARE_CURSORS="1"
11 export GOPRIVATE="github.com/duneanalytics/*"
12 export GOPATH="$HOME/dev/go"
13 export PATH="$HOME/.local/bin:$PATH:$GOPATH/bin:$HOME/.cargo/bin"
14-export QT_QPA_PLATFORM=wayland-egl
15 export QT_QPA_PLATFORMTHEME="qt5ct"
16 export QT_STYLE_OVERRIDE="kvantum"
17 export QT_WAYLAND_FORCE_DPI="physical"
18 export GTK_THEME="Breeze-Dark"
19 export VISUAL="nvim"
20 export XDG_CONFIG_HOME="$HOME/.config"
21-export XDG_SESSION_TYPE=wayland
22-export XDG_CURRENT_DESKTOP=sway
23 export VIRTUAL_ENV_DISABLE_PROMPT="true"
24 {{ range $_, $env := .zshrc.env_vars }}export {{ $env.name }}="{{ $env.value }}"
25-{{end}}
26+{{ end }}
27+# Wayland env vars
28+if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty2 ]]; then
29+ export MOZ_ENABLE_WAYLAND="1"
30+ export XDG_SESSION_TYPE=wayland
31+ export XDG_CURRENT_DESKTOP=sway
32+ export QT_QPA_PLATFORM=wayland-egl
33+fi
34+
35 # Valve shader compiler
36 export RADV_PERFTEST="aco"
37
38diff --git a/dot_zshrc b/dot_zshrc
39index 322e023466b7b2dfe6fd70b25b41d6e2d8acb33a..b15fca82a215a5a35363ad3ce1b759d69971832d 100644
40--- a/dot_zshrc
41+++ b/dot_zshrc
42@@ -66,4 +66,6 @@ fi
43 # startx on tty1
44 [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]] && exec startx -- vt1
45 # sway on tty2
46-[[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty2 ]] && exec sway
47+if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && [[ $(tty) = /dev/tty2 ]]; then
48+ exec sway
49+fi