From 98f583b306199101d4325ef8f3edc91042f8585c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 6 Feb 2014 23:37:36 -0500 Subject: [PATCH] add redshift-check helper --- .bin/redshift-check | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 .bin/redshift-check 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 +: -- 2.39.5