Add reset_title_pane() to tui
This commit is contained in:
parent
05de5c7294
commit
8e7d202c32
1 changed files with 13 additions and 0 deletions
|
|
@ -222,6 +222,19 @@ class TUI():
|
||||||
self.layout['Workers']['Panes'].clear()
|
self.layout['Workers']['Panes'].clear()
|
||||||
tmux.kill_pane(*panes)
|
tmux.kill_pane(*panes)
|
||||||
|
|
||||||
|
def reset_title_pane(
|
||||||
|
self,
|
||||||
|
line1: str = 'Title Text',
|
||||||
|
line2: str = '',
|
||||||
|
colors: list[str] | None = ['BLUE', ''],
|
||||||
|
) -> None:
|
||||||
|
"""Remove all extra title panes, reset main title pane, and update layout."""
|
||||||
|
panes = self.layout['Title']['Panes'].copy()
|
||||||
|
if len(panes) > 1:
|
||||||
|
tmux.kill_pane(*panes[1:])
|
||||||
|
self.layout['Title']['Panes'] = panes[:1]
|
||||||
|
self.set_title(line1, line2, colors)
|
||||||
|
|
||||||
def set_current_pane_height(self, height: int) -> None:
|
def set_current_pane_height(self, height: int) -> None:
|
||||||
"""Set current pane height and update layout."""
|
"""Set current pane height and update layout."""
|
||||||
self.layout['Current']['height'] = height
|
self.layout['Current']['height'] = height
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue