nordtheme / alacritty

An arctic, north-bluish clean and elegant Alacritty color scheme.
https://www.nordtheme.com/ports/alacritty
MIT License
476 stars 61 forks source link

Document installation via YAML anchors #13

Open arcticicestudio opened 4 years ago

arcticicestudio commented 4 years ago

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 commented 4 years ago

Not sure if this will play into how we update the documentation but https://github.com/alacritty/alacritty/commit/3c3e6870dedad56b270f5b65ea57d5a6e46b1de6 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 commented 3 years ago

@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.
jpcirrus commented 2 years ago

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