Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

colors: Store colors in a json format. #16

Merged
merged 8 commits into from
Jun 29, 2017
Merged

colors: Store colors in a json format. #16

merged 8 commits into from
Jun 29, 2017

Conversation

dylanaraps
Copy link
Owner

@dylanaraps dylanaraps commented Jun 29, 2017

This PR changes the colorscheme file format in wal from a list of hex colors to a json file. This makes it easier for users to create their own colorscheme files for use with wal. This will also make it easier for users to use the colors in other places (their own scripts or etc), json is easily parseable.

This PR also allows the user to specify the background, foreground and cursor colors independent of the colors 0-15.

Closes #15.

TODO:

  • Add support for saving wal generated schemes as json.
  • Update other functions to use json.
  • Update existing tests.
  • Write tests
  • Firgure out what these escape sequences control:
    • sequences.append(set_special(13, colors["foreground"]))
    • sequences.append(set_special(14, colors["background"]))

Example json scheme file:

{
    "special": {
        "background":"#3A5130",
        "foreground":"#FAF9F5",
        "cursor":"#FAF9F5"
    },

    "colors": {
        "color0":"#3A5130",
        "color1":"#E3A19D",
        "color2":"#E1CEAE",
        "color3":"#D6DDCC",
        "color4":"#F1D2CB",
        "color5":"#F5E9D6",
        "color6":"#F9F0E5",
        "color7":"#FAF9F5",
        "color8":"#999999",
        "color9":"#E3A19D",
        "color10":"#E1CEAE",
        "color11":"#D6DDCC",
        "color12":"#F1D2CB",
        "color13":"#F5E9D6",
        "color14":"#F9F0E5",
        "color15":"#FAF9F5"
    }
}

Note: Tests will fail since I've got a # TODO: comment.

@dylanaraps dylanaraps changed the title colors: Add support for importing colors in a json format. colors: Store colors in a json format. Jun 29, 2017
@dylanaraps dylanaraps merged commit 27e73e5 into master Jun 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant