Run cryptominer while the screen is locked

dbus-monitor --session "type=signal,interface=org.gnome.ScreenSaver" | 
while read MSG; do
LOCK_STAT=`echo $MSG | grep boolean | awk '{print $2}'`
if [[ "$LOCK_STAT" == "true" ]]; then
echo "was locked"
killall ethdcrminer64
screen -d -m /home/user/Downloads/Claymore/ethdcrminer64 -epool exp-us.dwarfpool.com:8018 -ewal 0xaddresshere/m3 -epsw x -allpools 1 -gser 2 -allcoins exp
else
echo "was un-locked"
killall ethdcrminer64
fi
done