Tweak underline of wezterm tab bar to skip whitespace at the start

This commit is contained in:
Evie Litherland-Smith 2023-03-17 10:17:21 +00:00
parent 6579d2b484
commit 2a5d59e5dc

View file

@ -18,14 +18,15 @@ M.setup = function(scheme)
}, #tabs + 1) }, #tabs + 1)
local elements = {} local elements = {}
table.insert(elements, "ResetAttributes") table.insert(elements, "ResetAttributes")
table.insert(elements, { Background = { Color = colours[tab.tab_index + 1] } })
table.insert(elements, { Foreground = { Color = text_fg } })
table.insert(elements, { Text = " " })
if tab.is_active then if tab.is_active then
table.insert(elements, { Attribute = { Underline = "Single" } }) table.insert(elements, { Attribute = { Underline = "Single" } })
table.insert(elements, { Attribute = { Intensity = "Bold" } }) table.insert(elements, { Attribute = { Intensity = "Bold" } })
end end
if hover then table.insert(elements, { Attribute = { Italic = true } }) end if hover then table.insert(elements, { Attribute = { Italic = true } }) end
table.insert(elements, { Background = { Color = colours[tab.tab_index + 1] } }) table.insert(elements, { Text = title })
table.insert(elements, { Foreground = { Color = text_fg } })
table.insert(elements, { Text = " " .. title })
table.insert(elements, "ResetAttributes") table.insert(elements, "ResetAttributes")
table.insert(elements, { Background = { Color = colours[tab.tab_index + 2] } }) table.insert(elements, { Background = { Color = colours[tab.tab_index + 2] } })
table.insert(elements, { Foreground = { Color = colours[tab.tab_index + 1] } }) table.insert(elements, { Foreground = { Color = colours[tab.tab_index + 1] } })