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

Alacritty 0.13.0 support #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ikoide
Copy link

@ikoide ikoide commented Jan 29, 2024

No description provided.

@ikoide ikoide mentioned this pull request Jan 29, 2024
@mbledkowski
Copy link

LGTM @saccarosium

@saccarosium
Copy link
Contributor

It should be generated with the gen.py script. First create a file called oxocarbon-dark.toml.j2 into the templates folder. Than you should modify the gen.py script to something like:

import yaml
import jinja2


def read_theme(name: str):
    theme = {}

    with open(f"palette/base16-oxocarbon-{name}.yaml", "r") as f:
        theme = yaml.safe_load(f)
        f.close()

    return theme


def main():
    env = jinja2.Environment(loader=jinja2.FileSystemLoader("./templates/"))
    tmp1 = env.get_template("oxocarbon-dark.toml.j2")
    tmp2 = env.get_template("oxocarbon-dark.yml.j2")
    thm = read_theme('dark')

    con1 = tmp1.render(thm)
    con2 = tmp2.render(thm)

    open('oxocarbon-dark.yml', 'w').close()

    with open('oxocarbon-dark.yml', 'w') as f:
        f.write(con1)
        f.close()

    open('oxocarbon-dark.toml', 'w').close()

    with open('oxocarbon-dark.toml', 'w') as f:
        f.write(con2)
        f.close()

main()

Please read and test this first I'm quite in a rush now.

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

Successfully merging this pull request may close these issues.

None yet

3 participants