#!/bin/sh
# Switch from the standard interface to Chatter (invoked by the launcher daemon
# on the multi-finger gesture). Lives on the device at /home/root/chatter/.
systemctl stop xochitl 2>/dev/null
systemctl stop chatter 2>/dev/null
systemctl reset-failed chatter 2>/dev/null
sleep 1
systemd-run --unit=chatter --collect \
  --setenv=QT_QUICK_BACKEND=epaper \
  --setenv=LD_LIBRARY_PATH=/usr/lib/plugins/scenegraph \
  --working-directory=/home/root/chatter \
  /home/root/chatter/chatter -platform epaper
