# ============================================================================ # DarkForge Linux — User Shell Profile (~/.zprofile) # ============================================================================ # Sourced on login to zsh. Auto-starts PipeWire and dwl on tty1. # This file is installed to /home/danny/.zprofile during system installation. # ============================================================================ # --- Environment variables for Wayland + NVIDIA ---------------------------- export XDG_SESSION_TYPE=wayland export XDG_RUNTIME_DIR="/run/user/$(id -u)" export XDG_CONFIG_HOME="${HOME}/.config" export XDG_CACHE_HOME="${HOME}/.cache" export XDG_DATA_HOME="${HOME}/.local/share" export XDG_STATE_HOME="${HOME}/.local/state" # NVIDIA Wayland-specific environment export GBM_BACKEND=nvidia-drm export __GLX_VENDOR_LIBRARY_NAME=nvidia export WLR_NO_HARDWARE_CURSORS=1 # WLR_NO_HARDWARE_CURSORS may be needed for wlroots + nvidia # Remove if hardware cursors work correctly export MOZ_ENABLE_WAYLAND=1 # Firefox: use Wayland backend export QT_QPA_PLATFORM=wayland # Qt applications: use Wayland backend export SDL_VIDEODRIVER=wayland # SDL2 games: prefer Wayland (falls back to X11 via XWayland) # --- Ensure XDG runtime directory exists ------------------------------------ if [ ! -d "${XDG_RUNTIME_DIR}" ]; then mkdir -p "${XDG_RUNTIME_DIR}" chmod 700 "${XDG_RUNTIME_DIR}" fi # --- Auto-start Wayland compositor on tty1 ---------------------------------- if [ -z "${WAYLAND_DISPLAY}" ] && [ "$(tty)" = "/dev/tty1" ]; then # Start PipeWire audio stack (runs as user, not system service) pipewire & pipewire-pulse & wireplumber & # Start the dwl Wayland compositor # dwl will set WAYLAND_DISPLAY and become the session leader exec dwl -s "foot" 2>/dev/null fi