summaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/zsh/dot_zprofile
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
commitaff435a0fb3a56b1d7b738c7dede363440884b3a (patch)
tree07acb41d37760aa169ee42dbeb69da3621cc7489 /dot_config/zsh/dot_zprofile
parenta7f74c1fa4b89c5829f5896842eb7248c820704c (diff)
downloaddotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.gz
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.bz2
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.zip
Add the Canonical laptop profile and setup workflows
Diffstat (limited to 'dot_config/zsh/dot_zprofile')
-rw-r--r--dot_config/zsh/dot_zprofile12
1 files changed, 8 insertions, 4 deletions
diff --git a/dot_config/zsh/dot_zprofile b/dot_config/zsh/dot_zprofile
index a2f5c8b..ab6badb 100644
--- a/dot_config/zsh/dot_zprofile
+++ b/dot_config/zsh/dot_zprofile
@@ -4,6 +4,8 @@
# Guard against double-sourcing (e.g. nested login shells)
[[ -n $__ZPROFILE_SOURCED ]] && return
__ZPROFILE_SOURCED=1
+_dotfiles_role=host
+[[ -r "$HOME/.config/dotfiles/role" ]] && _dotfiles_role=$(<"$HOME/.config/dotfiles/role")
# ── PATH ──────────────────────────────────────────────────────────────────────
typeset -U path # deduplicate PATH entries
@@ -104,13 +106,15 @@ export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswi
export _JAVA_AWT_WM_NONREPARENTING=1
# ── Miscellaneous ─────────────────────────────────────────────────────────────
-export QT_QPA_PLATFORMTHEME=qt6ct
-export NO_AT_BRIDGE=1 # suppress GTK accessibility bus warnings
+if [[ $_dotfiles_role == host ]]; then
+ export QT_QPA_PLATFORMTHEME=qt6ct
+ export NO_AT_BRIDGE=1
+fi
export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"
export INPUTRC="$XDG_CONFIG_HOME/sh/inputrc"
# ── Wayland ───────────────────────────────────────────────────────────────────
-export XDG_CURRENT_DESKTOP=sway
+[[ $_dotfiles_role == host ]] && export XDG_CURRENT_DESKTOP=sway
# Prefer Wayland for Qt; fall back to xcb for apps without qt{5,6}-wayland.
export QT_QPA_PLATFORM="wayland;xcb"
# SDL2 defaults to X11; force Wayland with X11 fallback. SDL3 ignores this.
@@ -142,7 +146,7 @@ case $(uname -n) in
esac
# ── Auto-start sway on VT1 ────────────────────────────────────────────────────
-if [[ -z $WAYLAND_DISPLAY && $XDG_VTNR == 1 ]]; then
+if [[ $_dotfiles_role == host && -z $WAYLAND_DISPLAY && $XDG_VTNR == 1 ]]; then
export XDG_SESSION_TYPE=wayland
exec sway
fi