-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add keybindingINIList output to Brick.Keybindings.Pretty #513
Comments
I am open to adding something like this to data INIGenerationConfig =
INIGenerationConfig { includeDescriptions :: Bool
, includeCustomizedBindings :: Bool
}
defaultINIGenerationConfig :: INIGenerationConfig
defaultINIGenerationConfig =
INIGenerationConfig { includeDescriptions = True
, includeCustomizedBindings = True
}
keybindingsToIni :: INIGenerationConfig -> KeyConfig k -> Text and would produce a hunk of INI text compatible with Would that work for your purposes? |
@jtdaugherty sounds good to me. I assume you meant Should I create a PR or do you want to do it? |
No, I meant
If you would like to do so, that would be great - I don't know when I'll have time to get to it, so if you are more motivated or have more time, please be my guest. Thanks! |
Also, a minor note that I didn't mention since I was going to change it in the implementation anyway: I'd rather use |
Also, I realized I forgot an argument. The function signature should be keybindingsToIni :: INIGenerationConfig -> Text -> KeyConfig k -> Text to include the name of the INI section that should be generated in the output. |
I want to show users the current/default keybindings configuration. The output should look like this:
In Swarm, I wrote
keyBindingINI
(which uses helperkeybindingEventINI
) by following the example ofkeybindingTextTable
.The code is essentially duplicated, though I opted to ignore non-customizable bindings for the INI output.
It would be nice if this was provided by Brick, as an inverse to
keybindingsFromIni
.The text was updated successfully, but these errors were encountered: