about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mpc-play-pause.sh8
-rwxr-xr-xscripts/nsp-console.sh2
-rwxr-xr-xscripts/toggle-compton.sh4
-rwxr-xr-xscripts/toggle-redshift.sh4
4 files changed, 5 insertions, 13 deletions
diff --git a/scripts/mpc-play-pause.sh b/scripts/mpc-play-pause.sh
deleted file mode 100755
index 6c82377..0000000
--- a/scripts/mpc-play-pause.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-if mpc | grep -q '\[playing\]'
-then
-    mpc pause
-else
-    mpc play
-fi
diff --git a/scripts/nsp-console.sh b/scripts/nsp-console.sh
index b83d526..510ecdb 100755
--- a/scripts/nsp-console.sh
+++ b/scripts/nsp-console.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if tmux list-sessions | grep -q "scratchpad"
+if tmux list-sessions | grep "scratchpad"
 then
     tmux attach-session -t "scratchpad"
 else
diff --git a/scripts/toggle-compton.sh b/scripts/toggle-compton.sh
index 7c36b2f..e5a3aaa 100755
--- a/scripts/toggle-compton.sh
+++ b/scripts/toggle-compton.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 
-if ! pgrep compton
+if ! pgrep compton > /dev/null 2>&1
 then
-    compton -b --config "$XDG_CONFIG_HOME/compton.conf"
+    compton -b
 else
     pkill compton
 fi
diff --git a/scripts/toggle-redshift.sh b/scripts/toggle-redshift.sh
index bd70f60..2813aea 100755
--- a/scripts/toggle-redshift.sh
+++ b/scripts/toggle-redshift.sh
@@ -1,8 +1,8 @@
 #!/usr/bin/env bash
 
-if ! pgrep redshift
+if ! pgrep redshift > /dev/null 2>&1
 then
-    redshift -c "$XDG_CONFIG_HOME/redshift.conf" &
+    redshift &
     disown redshift
 else
     pkill redshift

Consider giving Nix/NixOS a try! <3