Add function to replace colors by name

themes
khuxkm fbexl 2018-12-15 22:57:23 -05:00
parent 68253447b7
commit 6fafe8a8de
1 changed files with 8 additions and 0 deletions

View File

@ -273,6 +273,14 @@ colormap = [
("60", "light magenta", "default")
]
def replace_color(name,fg,bg=None):
for i,t in enumerate(colormap):
t = list(t)
if t[0]==name:
t[1] = fg
t[2] = bg if bg is not None else t[2]
colormap.__setitem__(i,tuple(t))
escape_map = {
key: urwid.vterm.ESC + sequence
for sequence, key in urwid.escape.input_sequences