#!/bin/sh

if false ; then
    dbus-send --system \
          --dest=org.freedesktop.systemd1 \
          --type=method_call \
          --print-reply \
          /org/freedesktop/systemd1 \
          org.freedesktop.systemd1.Manager.StartUnit \
          string:"webterminal-session.target" string:"fail"
else
    systemctl --user start webterminal-session.target
fi

sleep 5s
APP_PID=`pgrep -u $UID -nf kwin_wayland_wrapper`
if [ -n "$APP_PID" ] ; then
    waitpid $APP_PID
fi
