From 37de71d510adc3a3210b04c8b9c9630fe0467f68 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 27 Oct 2018 11:02:46 +0200 Subject: Add new scripts Signed-off-by: Florian Pritz --- toggle-music | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 toggle-music (limited to 'toggle-music') diff --git a/toggle-music b/toggle-music new file mode 100755 index 0000000..c491b76 --- /dev/null +++ b/toggle-music @@ -0,0 +1,8 @@ +#!/bin/bash + +if pgrep spotify &>/dev/null; then + mpc pause + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause +else + mpc toggle +fi -- cgit v1.2.3-24-g4f1b