# uwsm environment file for the Aqueous session.
#
# Installed to /etc/xdg/uwsm/env-aqueous. uwsm's env preloader scans the XDG
# hierarchy (XDG_CONFIG_HOME:XDG_CONFIG_DIRS:XDG_DATA_DIRS) for uwsm/env and
# uwsm/env-aqueous (plus their .d/ drop-in dirs), sources them before launching
# the compositor, and exports the resulting variables into the systemd --user /
# D-Bus activation environment. Users can override per-variable via
# ~/.config/uwsm/env-aqueous or ~/.config/uwsm/env-aqueous.d/*. The
# desktop-specific suffix (-aqueous) is derived from DesktopNames=Aqueous in
# aqueous.desktop, so these only apply to the Aqueous session and never pollute
# other Wayland sessions.
#
# NOTE: /etc/uwsm/ is NOT scanned by uwsm; this file must live under /etc/xdg/.
#
# These are the static toolkit/backend hints formerly exported inline by
# aqueous-wm.sh. Centralising them here means apps launched as systemd user
# units (via graphical-session.target / xdg-desktop-autostart.target) inherit
# them too, not only children of the compositor process.

export XDG_CURRENT_DESKTOP=Aqueous
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=Aqueous

# Toolkit backend hints. Apps prefer Wayland and fall back to the XWayland
# server managed directly by Aqueous when the native Wayland path is unavailable.
export QT_QPA_PLATFORM="wayland;xcb"
export GDK_BACKEND="wayland,x11"
export SDL_VIDEODRIVER="wayland,x11"
export CLUTTER_BACKEND=wayland
export MOZ_ENABLE_WAYLAND=1

# Fixes the grey-blob / non-reparenting Java/Swing/JetBrains bug under any
# non-reparenting WM, including Aqueous's native XWayland integration.
export _JAVA_AWT_WM_NONREPARENTING=1

# XWayland reads cursor settings only at server startup.
export XCURSOR_THEME="${XCURSOR_THEME:-Adwaita}"
export XCURSOR_SIZE="${XCURSOR_SIZE:-24}"

export AQUEOUS_NESTED=0
