12 lines
222 B
Plaintext
12 lines
222 B
Plaintext
|
#!/bin/bash
|
||
|
# Toggles a problem on and off
|
||
|
|
||
|
ID=$(pgrep "$1")
|
||
|
|
||
|
if [ -z "$ID" ]; then
|
||
|
"$@" & disown $1
|
||
|
quick-notify "Program Toggler" "$1 started"
|
||
|
else
|
||
|
killall $1 && quick-notify "Program Toggler" "$1 killed"
|
||
|
fi
|