MangoHud icon indicating copy to clipboard operation
MangoHud copied to clipboard

[Feature] Allow read_cfg in custom configuration file for apps

Open lfom opened this issue 3 years ago • 2 comments

First of all, thank you a lot for this super nice tool!

Right now, it is possible to use MANGOHUD_CONFIG="read_cfg,extra_parameters" to add extra parameters to the main MangoHud.conf file. But using an environment variable is not always straightforward.

When I tried to use read_cfg in a config file to just add some extra_parameter when running some game, it did not work. It is not a big deal, but importing the default config would make things much easier, simpler and clearer when the user just wants to add or override a stock parameter. It would also automatically apply any changes to the default configuration.

Simple example:

  1. Use GOverlay to create a custom config for MangoHud
  2. Create a file for running my_game (a native OpenGL game) like this:
$ cat ~/.config/MangoHud/my_game.conf
read_cfg
gl_bind_framebuffer=0

Another example:

  1. Use GOverlay to create a custom config for MangoHud
  2. Create a file for running my_game (a native OpenGL game) like this:
$ cat ~/Games/my_game//MangoHud.conf
read_cfg
gl_bind_framebuffer=0

Thanks again! Regards

lfom avatar Oct 04 '22 20:10 lfom

This would be a great feature to have. I was surprised Mangohud didn't behave like this already by default actually; I would've expected per-process profiles to override individual settings in the global config but still use the global setting for everything else.

Atemu avatar Jan 30 '23 12:01 Atemu

You should be able to do this using presets

presets.conf

[preset 1]
gpu_temp
cpu_temp

Game.conf

preset=1
gl_bind_framebuffer=0

flightlessmango avatar May 22 '24 12:05 flightlessmango