# uwsm environment file for the Aqueous session.
#
# uwsm sources this (along with ~/.config/uwsm/env and ~/.config/uwsm/env-aqueous)
# before launching the compositor, and exports the resulting variables into the
# systemd --user / D-Bus activation environment. 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.
#
# 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
