Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mangohud: make false values actually disable #6299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebaszv
Copy link
Contributor

@sebaszv sebaszv commented Jan 10, 2025

Description

mangohud: make false values actually disable

Currently the following, will produces some_opt=false in the rendered config:

programs.mangohud.settings = {
  some_opt = false;
};

With the intention being to disable the option, this would be incorrect, as per
the following stated at:
https://github.com/flightlessmango/MangoHud/blob/0575c8eb1f61692a2e5ca152c4f8ed70bef55ee2/data/MangoHud.conf#L3C5-L4C1

Use some_parameter=0 to disable a parameter (only works with on/off
parameters)

As such, I changed the rendering to follow this. This will be output instead: some_opt=0

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or
    nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See
    example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@zeratax

@sebaszv sebaszv force-pushed the mangohud/fix-disable-using-false branch from 26c0072 to f897f8a Compare January 10, 2025 05:09
Currently the following, will produces `some_opt=false` in the
rendered config:

```nix
programs.mangohud.settings = {
  some_opt = false;
};
```

With the intention being to disable the option, this would be
incorrect, as per the following stated at:
<https://github.com/flightlessmango/MangoHud/blob/0575c8eb1f61692a2e5ca152c4f8ed70bef55ee2/data/MangoHud.conf#L3C5-L4C1>

> Use some_parameter=0 to disable a parameter (only works with on/off
> parameters)

As such, I changed the rendering to follow this.
This will be output instead: `some_opt=0`
@sebaszv sebaszv force-pushed the mangohud/fix-disable-using-false branch from f897f8a to 07ff4e0 Compare January 10, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant