generate-alt-random: emit sixels on the alt screen

This commit is contained in:
Daniel Eklöf 2021-03-09 11:35:31 +01:00
parent f8e51fcb17
commit 4a86cd7475
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -158,8 +158,8 @@ def main():
reset_actions = ['\033[m', '\033[39m', '\033[49m']
out.write(random.choice(reset_actions))
# Leave alt screen
out.write('\033[m\033[r\033[?1049l')
# Reset colors
out.write('\033[m\033[r')
if opts.sixel:
# The sixel 'alphabet'
@ -210,6 +210,9 @@ def main():
# End sixel
out.write('\033\\')
# Leave alt screen
out.write('\033[?1049l')
if __name__ == '__main__':
sys.exit(main())