contour
contour copied to clipboard
Move all config options into profiles
Some options, like scrollbar, input_mapping etc. (those are the ones that matter to me), are not part of the profiles section in the config file. You can change these by launching contour with a different -c option, but it strikes me that there is no point in having profiles if you can only change some options using them.
PS: This issue template is silly. I'm not redesigning C or announcing a vaccine for malaria, I'm asking for a small change in a terminal emulator. I don't need an "abstract", "rationale", or "specification". At least rename them to "what is the problem", "why is this a problem", and "how do we fix it", or ideally, get rid of it.
Hey @pxeger
Many thanks for your feedback with regards to the templates. I will attempt to improve them then. ;-)
With regards to configuration, i partly agree, but where to draw the line?
scrollbar config is easily justifiable, but with Input mapping i have some reservations in moving that into profiles for (i think) one reason: you would potentially duplicate a lot in your config if you want varying input mappings in your profiles.
I am not against it (just to be clear).
What is your motivation for that? Can you share me your ideas here, if you don't mind?
Have some nice Christmas days. ;-)
potentially duplicate a lot of your config
May I introduce you to YAML Anchors and Aliases, designed expressly for this purpose! For example:
profiles:
profile_1:
# firstly define the anchor
input_mapping: &my_default_keymap
- { mods: [Control, Shift], key: Q, action: Quit }
# ...
profile_2:
# direct copy of the anchored section
input_mapping: *my_default_keymap
profile_3:
input_mapping:
# extend the referenced list
- *my_default_keymap
- { mods: [], key: F11, action: ToggleFullscreen }
# ...
So I don't think this is really a problem, provided we can teach this effectively. (maybe put it in the README example config file?)
Enjoy your Christmas too!
I am aware of anchors. I just considered migrating from YAML to JSON to provide better tooling (i want to also provide a GUI configuration dialog before hitting 1.0, so was the plan at least). And with YAML as underlying syntax the tooling would destroy the original anchors and aliases from the author.
But let's ignore that for a moment. What's your use case for different input mappings in profiles?
P.s. syntax-wise I currently prefer YAML though
For example, I use an interactive shell where I want to use F11 for functions (e.g. in vim), but I also want to display a status/dashboard program like htop which I can make full-screen easily with F11.
Maybe instead of using anchors/aliases you could have a similar system to the colour schemes, where multiple profiles can reference the same scheme?
I actually agree. And your second suggestion may win here. I will be thinking through it and keep you posted on the implementation/configuration details.
I will close this one, and implementation of the feature will be done in https://github.com/contour-terminal/contour/issues/173