wezterm: tab bar: consider max width

This commit is contained in:
LordMZTE 2023-08-13 06:20:58 +02:00
parent b387d81589
commit 0c3ce3d22e
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -59,7 +59,7 @@
(table.insert elems {:Background {:Color (bg tab)}})
(table.insert elems {:Foreground {:Color (fg tab)}})
(table.insert elems {:Text (.. " " title " ")})
(table.insert elems {:Text (.. " " (string.sub title 1 (math.min (- max_width 6) (length title))) " ")})
;; last tab
(when (= tab.tab_index (- (length tabs) 1))
@ -88,4 +88,5 @@
{:Foreground {:Color :#45475a}}
{:Background {:Color :#11111b}}
{:Text ""}])}
:tab_max_width 128
: keys}