How do I run a script when a program starts/ends?
Specifically, I made a script to toggle my touchpad/trackpoint on and off and I want to use it to turn inputs off when I start GIMP and to turn them on again when I stop it.
#!/bin/bash
if [ $1 = "on" ]
then
echo "Turning inputs on"
xinput enable 15
xinput enable 13
elif [ $1 = "off" ]
then
echo "Turning inputs off"
xinput disable 15
xinput disable 13
fi
This is my script (it was suggested that I include it)