summaryrefslogtreecommitdiffstats
path: root/toggle-music
blob: c491b76b94bf698da2594548db85d892722222f4 (plain)
1
2
3
4
5
6
7
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