Update add_title_pane() to match set_title()
This commit is contained in:
parent
b834be9f00
commit
7aafcd7c01
1 changed files with 9 additions and 3 deletions
|
|
@ -65,13 +65,18 @@ class TUI():
|
|||
# Add pane
|
||||
self.layout['Info']['Panes'].append(tmux.split_window(**tmux_args))
|
||||
|
||||
def add_title_pane(self, text) -> None:
|
||||
"""Add additional pane to title row."""
|
||||
def add_title_pane(self, line1, line2=None, colors=None) -> None:
|
||||
"""Add pane to title row."""
|
||||
lines = [line1, line2]
|
||||
colors = colors if colors else self.title_colors.copy()
|
||||
if not line2:
|
||||
lines.pop()
|
||||
colors.pop()
|
||||
tmux_args = {
|
||||
'behind': True,
|
||||
'lines': TMUX_TITLE_HEIGHT,
|
||||
'target_id': None,
|
||||
'text': text,
|
||||
'text': ansi.color_string(lines, colors, sep='\n'),
|
||||
'vertical': True,
|
||||
}
|
||||
if self.layout['Title']['Panes']:
|
||||
|
|
@ -186,6 +191,7 @@ class TUI():
|
|||
),
|
||||
)
|
||||
|
||||
|
||||
# Functions
|
||||
def fix_layout(layout, forced=False):
|
||||
"""Fix pane sizes based on layout."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue