scripts/toggle-program
2022-12-26 14:20:37 +01:00

12 lines
222 B
Bash
Executable File

#!/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