# uwsm environment file for the Aqueous-Git session.
#
# Installed to /etc/xdg/uwsm/env-aqueous-git. uwsm's env preloader scans the XDG
# hierarchy (XDG_CONFIG_HOME:XDG_CONFIG_DIRS:XDG_DATA_DIRS) for uwsm/env and
# uwsm/env-aqueous-git (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-git or ~/.config/uwsm/env-aqueous-git.d/*. The
# desktop-specific suffix (-aqueous-git) is derived from DesktopNames=Aqueous-Git in
# aqueous-git.desktop, so these only apply to the Aqueous-Git 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-git.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-Git
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=Aqueous-Git

# Toolkit backend hints. Apps prefer Wayland and fall back to the XWayland
# server managed directly by Aqueous-Git 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-Git's native XWayland integration.
export _JAVA_AWT_WM_NONREPARENTING=1

# Cursor variables are deliberately not defaulted here. A user can set them in
# ~/.config/uwsm/env (or env-aqueous-git); Aqueous-Git reads them when it starts and
# otherwise uses the normal "default" cursor-theme lookup at 24px. Setting a
# system value here would republish Adwaita at every login and overwrite cursor
# choices made by desktop settings tools. Runtime changes use `aqueousctl-git cursor
# set`; environment files cannot mutate an already-running process.

export AQUEOUS_NESTED=0
