Skip to content

Commit

Permalink
feat: Add support for terminal synchronized output
Browse files Browse the repository at this point in the history
- Add: Use `term_image.widget.UrwidImageScreen`.
  • Loading branch information
AnonymouX47 committed Apr 15, 2023
1 parent e64edd4 commit ad059bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/termvisage/tui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import urwid
from term_image.utils import get_terminal_name_version, lock_tty, write_tty
from term_image.widget import UrwidImageScreen

from .. import logging
from ..utils import CSI
Expand Down Expand Up @@ -40,7 +41,9 @@ def init(
main.RECURSIVE = args.recursive
main.SHOW_HIDDEN = args.all
main.ImageClass = ImageClass
main.loop = Loop(main_widget, palette, unhandled_input=process_input)
main.loop = Loop(
main_widget, palette, UrwidImageScreen(), unhandled_input=process_input
)
main.update_pipe = main.loop.watch_pipe(lambda _: None)

render.ANIM_CACHED = not args.cache_no_anim and (
Expand Down

0 comments on commit ad059bb

Please sign in to comment.