# Installed as /usr/share/uwsm/env-bluerune
#
# uwsm's environment preloader sources this (as POSIX sh) when "BlueRune" is in
# XDG_CURRENT_DESKTOP, which only the BlueRune session sets, before Hyprland starts. What it
# exports reaches the systemd and D-Bus activation environments, so the shell and the apps
# it or D-Bus start see it. Your own ~/.config/uwsm/env-bluerune is read after this one.
#
# The same choices as BlueRune's base config (bluerune-base/env.lua) makes for Hyprland:
# Qt's platform theme (KDE's when Plasma's integration is installed, otherwise qt6ct) and
# the applications menu KDE apps read for "Open with" (Plasma's, or archlinux-xdg-menu's).

if [ -f /usr/lib/qt6/plugins/platformthemes/KDEPlasmaPlatformTheme6.so ]; then
	export QT_QPA_PLATFORMTHEME=kde
else
	export QT_QPA_PLATFORMTHEME=qt6ct
fi

if [ -f /etc/xdg/menus/plasma-applications.menu ]; then
	export XDG_MENU_PREFIX=plasma-
else
	export XDG_MENU_PREFIX=arch-
fi
