FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.7k stars 185 forks source link

Add GAMEMODE_CONFIG environment variable to specifiy gamemode.ini location #491

Open CyberCois opened 1 month ago

CyberCois commented 1 month ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I find it difficult to make per game configurations. Ex. gamemode.ini with a custom script for 4:3 stretched resolution for CS2, but a different custom script for other games. This would also help with organization of config files.

Describe the solution you'd like A clear and concise description of what you want to happen. GAMEMODE_CONFIG environment variable should take precedence over all other config file locations. The would allow for steam launch options such as: GAMEMODE_CONFIG=~/.config/gamemode/gamemode-callofduty.ini gamemoderun %command%

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Trying to find $PWD and put the config file in that location for steam games.

Additional context Add any other context or screenshots about the feature request here.

mdiluz commented 1 month ago

Unfortunately this doesn't quite work in the current logic, even if code were implemented to pass the config over the dbus connection to the daemon - in particular because gamemode is itself a "global" on or off mode, I don't think there'd be a way to selectively activate certain settings like that.

Unless the code has changed since I wrote it! Perhaps it could be possible now in some form.