#!/bin/sh
# check session type and select configuration path for lxqt-panel
process=$(ps -e|grep -w lxqt-panel|wc -l)
# Alert if a panel is running already
if [ "$process" -ge 1 ]; then
  notify-send -a lxqt-panel -i dialog-warning "There is more than one panel running, please check your session settings and make sure that only 'Panel x11/Wayland' is activated"
  lxqt-config-session
fi
if
   [ "$XDG_SESSION_TYPE" = "wayland" ];
   then
     exec  lxqt-panel -c $XDG_CONFIG_HOME/lxqt-wayland/panel-wayland.conf
else
     exec lxqt-panel
fi
