mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Replay set_dynamic_color and set_color_table_color
This commit is contained in:
@@ -125,14 +125,14 @@ def write_osc(code, string=''):
|
|||||||
write(OSC + str(code) + string + '\x07')
|
write(OSC + str(code) + string + '\x07')
|
||||||
|
|
||||||
|
|
||||||
set_dynamic_color = write_osc
|
set_dynamic_color = set_color_table_color = write_osc
|
||||||
|
|
||||||
|
|
||||||
def replay(raw):
|
def replay(raw):
|
||||||
for line in raw.splitlines():
|
for line in raw.splitlines():
|
||||||
if line.strip():
|
if line.strip():
|
||||||
cmd, rest = line.partition(' ')[::2]
|
cmd, rest = line.partition(' ')[::2]
|
||||||
if cmd in {'draw', 'set_title', 'set_icon'}:
|
if cmd in {'draw', 'set_title', 'set_icon', 'set_dynamic_color', 'set_color_table_color'}:
|
||||||
globals()[cmd](rest)
|
globals()[cmd](rest)
|
||||||
else:
|
else:
|
||||||
rest = map(int, rest.split()) if rest else ()
|
rest = map(int, rest.split()) if rest else ()
|
||||||
|
|||||||
Reference in New Issue
Block a user