#!/bin/sh

if [ -f /etc/xdg/menus/plasma-applications.menu ] && command -v xdg-desktop-portal-kde >/dev/null 2>&1; then
  dbus-update-activation-environment --systemd XDG_MENU_PREFIX=plasma- >/dev/null 2>&1 || true
  systemctl --user set-environment XDG_MENU_PREFIX=plasma-
else
  systemctl --user unset-environment XDG_MENU_PREFIX >/dev/null 2>&1 || true
fi
