dotfiles/bin/toggle
2021-02-19 21:01:52 +02:00

14 lines
199 B
Bash
Executable file

#!/bin/sh
if [ -z "`pgrep -x $1`" ]; then
$@ &
if [ "$1" = mpd ]; then
sleep 1
mpd-mpris &
mpd-rpc &
fi
notify-send $1 "is now enabled"
else
notify-send $1 "is now disabled"
pkill $1
fi