From: Mike Frysinger Date: Fri, 7 Feb 2014 04:37:36 +0000 (-0500) Subject: add redshift-check helper X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=98f583b306199101d4325ef8f3edc91042f8585c;p=home.git add redshift-check helper --- diff --git a/.bin/redshift-check b/.bin/redshift-check new file mode 100755 index 0000000..f8f2ca8 --- /dev/null +++ b/.bin/redshift-check @@ -0,0 +1,8 @@ +#!/bin/sh +h=$(date +%H) +if [ ${h#0} -lt 10 -o ${h#0} -ge 21 ]; then + (pgrep redshift >/dev/null 2>&1 || DISPLAY=:0 redshift) & +else + killall -q redshift +fi +: