#!/bin/bash if pgrep -x "redshift" > /dev/null then #echo 'Redshift exists, killing it' notify-send 'Redshift is now OFF' kill $(pidof redshift) else #echo "Redshift doesn't exist, spawning it" notify-send 'Redshift is now ON' redshift 1>/dev/null 2>&1 & fi