about summary refs log tree commit diff
path: root/scripts/toggle-redshift.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toggle-redshift.sh')
-rwxr-xr-xscripts/toggle-redshift.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/toggle-redshift.sh b/scripts/toggle-redshift.sh
index 8ba6b60..4dbcc38 100755
--- a/scripts/toggle-redshift.sh
+++ b/scripts/toggle-redshift.sh
@@ -1,9 +1,9 @@
 #!/usr/bin/env bash
 
-if [[ $(pgrep 'redshift') ]]
+if ! pgrep redshift
 then
-    pkill "redshift"
-else
     redshift -c "${XDG_CONFIG_HOME}/redshift.conf" &
     disown redshift
+else
+    pkill redshift
 fi

Consider giving Nix/NixOS a try! <3