misc: cleanup

This commit is contained in:
Dylan Araps 2018-03-16 09:43:51 +11:00
parent 534768a791
commit ae1c31305f

View File

@ -131,15 +131,15 @@ def get(img, cache_dir=CACHE_DIR,
def terminal_sexy_to_wal(data):
"""Convert terminal.sexy json schema to wal."""
data["colors"] = {}
data["special"] = {}
data["special"] = {
"foreground": data["foreground"],
"background": data["background"],
"cursor": data["color"][9]
}
for i, color in enumerate(data["color"]):
data["colors"]["color%s" % i] = color
data["special"]["foreground"] = data["foreground"]
data["special"]["background"] = data["background"]
data["special"]["cursor"] = data["colors"]["color1"]
return data