Skip to content

Conversation

Yaraslaut
Copy link
Member

@Yaraslaut Yaraslaut commented Jun 25, 2023

Closes #1063

This PR partially implements inheritance of configuration file from proposal #1063
Configuration profile is loaded based on default_profile: ...... field and this profile is the only profile that must be properly configured.
Following logic is implemented for loading configuration of profile:

  • user defined default_profile is loaded based on provided configuration file, if entry does not exist error will be emmited and default value providede by contour will be used
  • each profile in the configuration file inherits all values from default_profile and if some of the field is provided inside configuration provided value for this profile will be used

example:

profiles:
    main:
.......................
    inher:
        shell: "/usr/bin/bash"
        history:
            limit: 0

Inheritance also implemented for color chemes with the only difference that color_schemes.default is always used as default color chemes and must be properly configured

@github-actions github-actions bot added the frontend Contour Terminal Emulator (GUI frontend) label Jun 25, 2023
@Yaraslaut Yaraslaut changed the title Implements inheritance of configuration profile based on default Inheritance of configuration profile based on default Jun 25, 2023
@github-actions github-actions bot added the fonts font rasterization and text shaping API and platform implementations label Jun 26, 2023
@Yaraslaut Yaraslaut force-pushed the feature/inheritance_config branch from efb28f8 to 23524f1 Compare June 26, 2023 07:40
@Yaraslaut Yaraslaut marked this pull request as ready for review June 29, 2023 09:45
Copy link
Member

@christianparpart christianparpart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks!

@christianparpart christianparpart merged commit 53e10c8 into master Jun 30, 2023
@christianparpart christianparpart deleted the feature/inheritance_config branch June 30, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fonts font rasterization and text shaping API and platform implementations frontend Contour Terminal Emulator (GUI frontend)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement inheritance of config trees (without YAML anchors...)
2 participants