self.chat = chat
super().__init__(**kwargs)
+ @property
+ def status_title(self) -> str:
+ return f'{super().status_title}|{self.client_id}|{self.chat}'
+
def cmd__disconnect(self, quit_msg: str = 'ircplom says bye') -> None:
'Send QUIT command to server.'
self._cput(SendEvent,
self.prompt.set_geometry(_YX(self._term.size.y - 1, self._term.size.x))
return True
+ @property
+ def status_title(self) -> str:
+ 'Window title to display in status line.'
+ return str(self.idx)
+
def draw(self) -> bool:
self._term.clear()
if not super().draw():
for y, line in enumerate(lines):
self._term.write(line, y)
return False
- idx_box = f'[{self.idx}]'
- status_line = idx_box + '=' * (self._term.size.x - len(idx_box))
+ title_box = f'[{self.status_title}]'
+ status_line = title_box + '=' * (self._term.size.x - len(title_box))
self.log.draw()
self._term.write(status_line, self._y_status)
self.prompt.draw()