dotfiles/bin/toggle

10 lines
134 B
Text
Raw Normal View History

2021-02-13 12:49:36 +00:00
#!/bin/sh
if [ -z "`pgrep -x $1`" ]; then
$@ &
notify-send $1 "is now enabled"
else
notify-send $1 "is now disabled"
pkill $1
fi