aboutsummaryrefslogtreecommitdiffstats
path: root/bin/cmus_toggle
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-03-19 07:08:45 +0000
committerterminaldweller <thabogre@gmail.com>2022-03-19 07:08:45 +0000
commit034c00886af9ded731c2689f0bcc42f1381127c9 (patch)
tree2adbca62e94a67e540bc86ba0b9970c830166d61 /bin/cmus_toggle
parentupdate (diff)
downloadscripts-034c00886af9ded731c2689f0bcc42f1381127c9.tar.gz
scripts-034c00886af9ded731c2689f0bcc42f1381127c9.zip
mostly pretty git logs
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