As the title suggests - 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/bashif [ $1 = on ]then    echo Turning inputs on    xinput enable 15    xinput enable 13elif [ $1 = off ]then    echo Turning inputs off    xinput disable 15    xinput disable 13fiThis is my script (it was suggested that I include it)
How to execute a script on program launch and end
bash;gimp
The proper way to do this is to use an alias:Since I wanted to turn some stuff off when gimp starts and on when gimp ends, I would executealias gimp=toggle-input off; gimp; toggle-input onNow, when gimp is executed, it will first execute toggle-input off, then it will run gimp, then after gimp is finished being used it will execute toggle-input on.