mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-14 00:23:47 +01:00
wezterm: tab bar: consider max width
This commit is contained in:
parent
b387d81589
commit
0c3ce3d22e
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
(table.insert elems {:Background {:Color (bg tab)}})
|
(table.insert elems {:Background {:Color (bg tab)}})
|
||||||
(table.insert elems {:Foreground {:Color (fg 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
|
;; last tab
|
||||||
(when (= tab.tab_index (- (length tabs) 1))
|
(when (= tab.tab_index (- (length tabs) 1))
|
||||||
|
@ -88,4 +88,5 @@
|
||||||
{:Foreground {:Color :#45475a}}
|
{:Foreground {:Color :#45475a}}
|
||||||
{:Background {:Color :#11111b}}
|
{:Background {:Color :#11111b}}
|
||||||
{:Text ""}])}
|
{:Text ""}])}
|
||||||
|
:tab_max_width 128
|
||||||
: keys}
|
: keys}
|
||||||
|
|
Loading…
Reference in a new issue