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

Document installation via YAML anchors #13

Open
arcticicestudio opened this issue Aug 14, 2020 · 3 comments
Open

Document installation via YAML anchors #13

arcticicestudio opened this issue Aug 14, 2020 · 3 comments

Comments

@arcticicestudio
Copy link
Contributor

Like documented in the Alacritty wiki the configuration file can contain multiple color schemes by using the great YAML anchor and aliases feature. This is way better than the currently documented installation method that replaces the whole color scheme that was defined before.
By using YAML anchors the user can simply switch between multiple themes without the need to copy & paste them every time but only changing the reference name of the colors field.

schemes:
  nord: &nord
    primary:
      #...
    cursor:
      # ...
    normal:
      #...
    bright:
      #...
    dim:
      # ...

colors: *nord
@amayer5125
Copy link
Contributor

amayer5125 commented Sep 1, 2020

Not sure if this will play into how we update the documentation but alacritty/alacritty@3c3e687 was added recently and will allow importing additional config files to overwrite settings in the main config file.

It isn't in a released version yet. But I'm imagining we could add a line like

import:
  - ~/.config/alacritty/nord.yml

to the main config file and have it point to src/nord.yml file that the user would download from this repository.

@arcticicestudio
Copy link
Contributor Author

arcticicestudio commented Sep 17, 2020

@amayer5125 Thanks, that's exactly what I was hoping for to be added some day 🥳 That will be the recommended installation method since it won't mess with the users configuration file at all.
I guess we can still add the YAML anchors to the documentation so we end up with…

  1. installation per theme file import (recommended, allows to use multiple themes without configuration file mess up)
  2. installation via YAML anchors (also allows to use multiple themes defined in the configuration file)
  3. manual installation via copy&paste of the Nord colors into the configuration file.

@arcticicestudio arcticicestudio added the Hacktoberfest This repository participates in the Hacktoberfest label Oct 8, 2020
@arcticicestudio arcticicestudio removed the Hacktoberfest This repository participates in the Hacktoberfest label Nov 13, 2020
@jpcirrus
Copy link

Alacritty added the configuration file option for sourcing other files (import), in version 0.6.0, released on 2020-11-25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants