about summary refs log tree commit diff
path: root/scripts/toggle-compton.sh
diff options
context:
space:
mode:
authorazahi <azahi@teknik.io>2019-09-04 00:37:09 +0300
committerazahi <azahi@teknik.io>2019-09-04 00:37:09 +0300
commitc12e737a4f3bb78bf6b77c9b2bfd93610be2937f (patch)
tree41ef9ae2238e96c1fc4b12b4a00ec05e4a39e064 /scripts/toggle-compton.sh
parentReplace alsa-mixer with external shell alternative (diff)
Bump 0.15.4
Diffstat (limited to 'scripts/toggle-compton.sh')
-rwxr-xr-xscripts/toggle-compton.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/toggle-compton.sh b/scripts/toggle-compton.sh
index 91ebc4d..ee3c880 100755
--- a/scripts/toggle-compton.sh
+++ b/scripts/toggle-compton.sh
@@ -1,8 +1,8 @@
 #!/usr/bin/env bash
 
-if [[ $(pgrep 'compton') ]]
+if ! pgrep compton
 then
-    pkill "compton"
-else
     compton -b --config "${XDG_CONFIG_HOME}/compton.conf"
+else
+    pkill compton
 fi

Consider giving Nix/NixOS a try! <3