mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
15 lines
351 B
Python
15 lines
351 B
Python
import typing as T
|
|
|
|
import urwid
|
|
|
|
|
|
class CustomListWalker(urwid.SimpleFocusListWalker):
|
|
def append(self, item: T.Any) -> None:
|
|
super().append(item)
|
|
self.set_focus(len(self) - 1)
|
|
|
|
|
|
class CustomListBox(urwid.ListBox):
|
|
def __init__(self, widgets: T.List[urwid.Widget]) -> None:
|
|
super().__init__(CustomListWalker(widgets))
|