#include "AppControl.h"

#include <QProcess>

void AppControl::returnToStandard()
{
    // Launch a transient unit so the work isn't killed when chatter stops.
    QProcess::startDetached(
        QStringLiteral("systemd-run"),
        {QStringLiteral("--collect"),
         QStringLiteral("--unit=chatter-to-standard"),
         QStringLiteral("/bin/sh"), QStringLiteral("-c"),
         QStringLiteral("systemctl stop chatter; systemctl start xochitl")});
}
