Gogh-Co / Gogh

Gogh is a collection of color schemes for various terminal emulators, including Gnome Terminal, Pantheon Terminal, Tilix, and XFCE4 Terminal also compatible with iTerm on macOS.
https://gogh-co.github.io/Gogh/
MIT License
9.12k stars 585 forks source link

KeyError 'colors' on Alacritty #304

Open tquin opened 3 years ago

tquin commented 3 years ago

Hi,

I've hit an bug affecting Alacritty specifically from what I can see - on the same machine, xfce4-terminal runs the script perfectly. Specifically, this is the error I'm getting in Alacritty:

Enter OPTION(S) : 122

Theme: Neon Night
•••••••• ••••••••

Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/home/USERNAME/.local/lib/python3.9/site-packages/ruamel/yaml/comments.py", line 918, in __getitem__
    return ordereddict.__getitem__(self, key)
KeyError: 'colors'

I'm assuming that's referencing the apply-alacritty.py file.

For system info, running on Arch/EndeavourOS, with i3 as the WM. Thanks!

jdrusso commented 2 years ago

In your alacritty.yml config file, uncomment the colors key, along with primary, normal, and bright under it. You may also need to export TERMINAL=alacritty.

apply-alacritty.py reads your current config in as a dict and tries to update it with the new colors. However, since colors are in a nested dict (i.e., config['colors']['primary']), if the top-level colors dict doesn't exist, it can't reference the nested ones.