super().__init__(**kwargs)
@property
- def _status_title(self) -> str:
- return f'{super()._status_title}|{self.client_id}|{self.stream}'
+ def status_title(self) -> str:
+ return f'{super().status_title}|{self.client_id}|{self.stream}'
def _send_msg(self, verb: str, params: tuple[str, ...], **kwargs) -> None:
self._client_trigger('send', msg=IrcMessage(verb=verb, params=params),
return True
@property
- def _status_title(self) -> str:
+ def status_title(self) -> str:
'Window title to display in status line.'
return str(self.idx)
for y, line in enumerate(lines):
self._term.write(line, y)
return False
- title_box = f'[{self._status_title}]'
+ 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)
for item in sorted(to_log):
self._log.add(f' /{item}')
+ def cmd__list(self) -> None:
+ 'List available windows.'
+ self._log.add('windows available via /window:')
+ for win in self._windows:
+ self._log.add(f' {win.status_title}')
+
def cmd__quit(self) -> None:
'Trigger program exit.'
self._put(QuitEvent())