From 81dc992dfa439daefae6211b3ec0daa989c07550 Mon Sep 17 00:00:00 2001 From: telans Date: Thu, 13 Feb 2020 11:17:32 +1300 Subject: [PATCH] readme: mention config --- README.md | 45 +++++++++++++++++++++++++++++++-------------- build.sh | 3 ++- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9c9ffeb1..93a1ba3f 100644 --- a/README.md +++ b/README.md @@ -34,20 +34,37 @@ To enable the MangoHud Vulkan overlay layer, run : Or alternatively, add `MANGOHUD=1` to your shell profile. -## MANGOHUD_CONFIG parameters - -You can customize the hud by using the MANGOHUD_CONFIG environment variable while separating different options with a comma. Add `some_parameter=0` to hide said parameter. - -- `cpu_temp` : Displays current CPU temperature -- `gpu_temp` : Displays current GPU temperature -- `core_load` : Displays current CPU load per core -- `ram` : Displays system memory usage -- `vram` : Displays GPU memory usage -- `font_size` : Changes the default font size (default is 24) -- `width` : Set custom hud width -- `height` : Set custom hud height -- `position=x`: Available values for `x` include `top-left`, `top-right`, `bottom-left`, and `bottom-right` -- `frame_timing` : Displays frame time line plot +## Hud configuration + +MangoHud comes with a config file which can be used to set configuration options globally or per application. The priorities of different config files are: + +1. `/path/to/application/dir/MangoHud.conf` +2. `$HOME/.config/MangoHud/{application_name}.conf` +3. `$HOME/.config/MangoHud/MangoHud.conf` +4. `$HOME/.local/share/MangoHud/MangoHud.conf` + +The default config file is installed to `$HOME/.config/MangoHud/MangoHud.conf` and will not be overwritten by the script. + +--- + +### `MANGOHUD_CONFIG` environment varianble + +You can also customize the hud by using the `MANGOHUD_CONFIG` environment variable while separating different options with a comma. This takes priority over any config file. + +A partial list of parameters are below. See the config file for a complete list. + +| Variable | Description | +|------------------------------------|---------------------------------------------------------------------------------------| +| `cpu_temp`
`gpu_temp` | Displays current CPU/GPU temperature | +| `core_load` | Displays load & frequency per core | +| `ram`
`vram` | Displays system RAM/VRAM usage | +| `full` | Enables all of the above config options | +| `crosshair` | Adds a crosshair overlay at the centre of the screen | +| `font_size=` | Customizeable font size (default=24) | +| `width=`
`height=` | Customizeable hud dimensions (in pixels) | +| `position=` | Location of the hud: `top-left` (default), `top-right`, `bottom-left`, `bottom-right` | +| `no_display` | Hide the hud by default | +| `toggle_hud=`
`toggle_logging=` | Modifiable toggle hotkeys. Default are F12 and F2, respectively. | Note: Width and Height are set automatically based on the font_size, but can be overridden. diff --git a/build.sh b/build.sh index 44fd915b..22729bc0 100755 --- a/build.sh +++ b/build.sh @@ -110,7 +110,8 @@ package() { cp "$LAYER" "$INSTALL_DIR/.local/share/vulkan/implicit_layer.d/mangohud64.json" cp "$LAYER" "$INSTALL_DIR/.local/share/vulkan/implicit_layer.d/mangohud32.json" cp --preserve=mode "bin/install.sh" "build/package/MangoHud/install.sh" - cp "bin/MangoHud.conf" "$INSTALL_DIR/"{.config/MangoHud/MangoHud.conf,.local/share/MangoHud/MangoHud.conf} + cp "bin/MangoHud.conf" "$INSTALL_DIR/.config/MangoHud/MangoHud.conf" + cp "bin/MangoHud.conf" "$INSTALL_DIR/.local/share/MangoHud/MangoHud.conf" sed -i "s|64bit|32bit|g" "$INSTALL_DIR/.local/share/vulkan/implicit_layer.d/mangohud32.json" tar -C build/package -cpzf "build/MangoHud-$VERSION.tar.gz" .