1
0
Fork 0

remove title compression when title is too long

This commit is contained in:
Luca Bilke 2022-08-01 14:31:03 +02:00
parent 758ad758f4
commit 5498a842fd
1 changed files with 3 additions and 3 deletions

View File

@ -89,9 +89,9 @@ def _draw_left_status(
screen.cursor.x = len(ICON)
screen.draw(" ")
screen.cursor.bg = tab_bg
if tab.title.rindex(tab.title[-1]) + 1 > 15:
title = f'{os.path.splitext(tab.title)[0][:14-len(os.path.splitext(tab.title))]}{os.path.splitext(tab.title)[1]}'
tab = TabBarData(title, tab.is_active, tab.needs_attention, tab.num_windows, tab.num_window_groups, tab.layout_name, tab.has_activity_since_last_focus, tab.active_fg, tab.active_bg, tab.inactive_fg, tab.inactive_bg)
# if tab.title.rindex(tab.title[-1]) + 1 > 15:
# title = f'{os.path.splitext(tab.title)[0][:14-len(os.path.splitext(tab.title))]}…{os.path.splitext(tab.title)[1]}'
# tab = TabBarData(title, tab.is_active, tab.needs_attention, tab.num_windows, tab.num_window_groups, tab.layout_name, tab.has_activity_since_last_focus, tab.active_fg, tab.active_bg, tab.inactive_fg, tab.inactive_bg)
draw_title(draw_data, screen, tab, index)
if not needs_soft_separator:
screen.draw(" ")