aboutsummaryrefslogtreecommitdiffstats
path: root/bin/cmus_toggle
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/cmus_toggle8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/cmus_toggle b/bin/cmus_toggle
new file mode 100755
index 0000000..8568a82
--- /dev/null
+++ b/bin/cmus_toggle
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+STATUS=$(cmus-remote -Q | grep status | awk '{print $2}')
+if [ "$STATUS" = paused ];then
+ cmus-remote -p
+elif [ $STATUS = playing ];then
+ cmus-remote -u
+fi