What is the environment variable that’s always trusted (and will never change) to identify the current running desktop is KDE Plasma? Even if two or more desktops are installed on the same machine.
From my installation:
Wayland:
echo $DESKTOP_SESSION
plasmawayland
echo $XDG_CURRENT_DESKTOP
KDE
X11:
echo $DESKTOP_SESSION
plasma
echo $XDG_CURRENT_DESKTOP
KDE