#!/bin/bash

PIDS=`ps cax | grep xcompmgr | grep -o '^[ ]*[0-9]*'`
if [ -z "$PIDS" ]; then
  xcompmgr -cCfF -t-3 -l-3 -r8 -o.95 -D6 -I0.06 -O0.06 &
  notify-send "Scion Updater" "Compositor enabled" -i /opt/scion/scion-planets-64.png -h string:synchronous:anything
  exit 1
else
  pkill xcompmgr &
  notify-send "Scion Updater" "Compositor disabled" -i /opt/scion/scion-planets-64.png -h string:synchronous:anything
fi
