From ab4b74e8770083a959821847021a3e4ae15bcce8 Mon Sep 17 00:00:00 2001 From: raul Date: Sun, 21 Jan 2024 18:31:13 +0100 Subject: [PATCH] Upload main script --- toggleshift | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 toggleshift diff --git a/toggleshift b/toggleshift new file mode 100644 index 0000000..10e13e3 --- /dev/null +++ b/toggleshift @@ -0,0 +1,12 @@ +#!/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