Open pchome opened 4 years ago
I like this idea, and would love a pull request. The only thing I would say is that i think it would make the most sense to use xdg-open
like you have commented out in the example, since there's no way of knowing what text editor would be available.
The problem with xdg-open
is that it do not wait for process to exit, so the text editor running in parallel with the game. I should figure out is there other XDG utility to determine available program.
Also I'm not sure how binaries should be distributed or built in python packages. Maybe template should be the file too, then it could be more complex and contain some examples.
So, before I eventually will figure this out, any hints are welcomed. I'll do the PR then.
While I thought about custom launcher for protonfixes, and maybe some kind of gamefix parser, I remembered the winetricks GUI which I almost never used before, but which can be a good start.
Here is my attempt to combine everything together: pf-launcher-draft-v3.patch.gz
It's very basic, and I'm still unsure about some things, but if this patch is acceptable, you can use git apply /path/to/pf-launcher-draft-v3.patch
and close this issue for now.
The idea is simple: hold Left Ctrl key during game launch to spawn an program where one can add/modify PF options.
I hacked this as two parts: a simple keypress detector, to avoid additional dependencies (except it depends on X11), and a patch.
is_ctrl_key.c
patch
When
LCtrl
pressed, PF will check for existing local gamefix or will create a new one from template. Then (in this example) will open it with the text editor (kate
). After closing editor session PF will continue it's work and should load modified gamefix as usual.Could be changed to an GUI program with most common proton switches to select, if any do/will exist.