summaryrefslogtreecommitdiffstats
path: root/toggle-music
blob: 3153ea00d526042802c94018322d7502713097ff (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

if pgrep spotify &>/dev/null; then
	mpc pause >/dev/null
	dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
else
	mpc toggle >/dev/null
fi