2021-02-13 12:49:36 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if [ -z "`pgrep -x $1`" ]; then
|
|
|
|
$@ &
|
2021-02-19 19:01:52 +00:00
|
|
|
if [ "$1" = mpd ]; then
|
|
|
|
sleep 1
|
|
|
|
mpd-mpris &
|
2021-03-23 07:53:51 +00:00
|
|
|
mpd-rpc --no-idle --dont-broadcast-the-paused-state &
|
|
|
|
#those tho will kill themselves when mpd gets killed so we're good
|
2021-02-19 19:01:52 +00:00
|
|
|
fi
|
2021-02-13 12:49:36 +00:00
|
|
|
notify-send $1 "is now enabled"
|
|
|
|
else
|
|
|
|
notify-send $1 "is now disabled"
|
|
|
|
pkill $1
|
|
|
|
fi
|