How can I run shell scripts before and while a game runs?

I thought this would be the Command prefix, Manual script, Pre-launch script, and Post-exit script paths in the System options of a game.

However, putting a path to a simple script in any of those didn’t run it. Are these paths meant for cmd scripts that run inside of Wine or something else?

I’m trying to use the equivalent of the launch options Steam provides where you can pass arguments to the game, configure Proton, and run shell commands before a game launches.

So I’ve found that shell scripts are meant to be placed in the Pre-launch script and Post-exit script boxes. They just need #!/bin/sh at the top or whatever program you want to specify. For some reason Steam and file managers don’t require it though.

Still no clue on what Command prefix and Manual script do though.

Here is where they used in the code though, if anyone wants to try to figure it out.