diff --git a/docs/changelog.md b/docs/changelog.md index 4ac1c75e5..adc0146cd 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -47,6 +47,7 @@ brief notes about them may accumulate here. * X11: improved DPI detection for high-DPI displays. [#515](https://github.com/wez/wezterm/issues/515) * X11: we now load the XCursor themes when possible, which means that the mouse cursor is now generally a bit larger and clearer as well as conforming more with the prevailing style of the desktop environment. [#524](https://github.com/wez/wezterm/issues/524) * New: [window:set_right_status](config/lua/window/set_right_status.md) allows setting additional status information in the tab bar. [#500](https://github.com/wez/wezterm/issues/500) +* New: [tab_bar_style](config/lua/config/tab_bar_style.md) allows customizing the appearance of the rest of tha tab bar. * Changed the default [font_size](config/lua/config/font_size.md) to 12 points. [#517](https://github.com/wez/wezterm/discussions/517) * Window: fixed "Open WezTerm Here" context menu in explorer when used on the root of a drive (eg: `C:\`). Thanks to [@flyxyz123](https://github.com/flyxyz123)! [#526](https://github.com/wez/wezterm/issues/526) [#451](https://github.com/wez/wezterm/issues/451) * New: animated gif and png images displayed via the `wezterm imgcat` (the iTerm2 image protocol), or attached to the window background via [window_background_image](config/appearance.html#window-background-image) will now animate while the window has focus. diff --git a/docs/config/lua/config/tab_bar_style.md b/docs/config/lua/config/tab_bar_style.md new file mode 100644 index 000000000..d982ce049 --- /dev/null +++ b/docs/config/lua/config/tab_bar_style.md @@ -0,0 +1,63 @@ +# `tab_bar_style` + +*Since: nightly builds only* + +This config option allows styling the elements that appear in the tab bar. +This configuration supplements the [tab bar color](../../../config/appearance.html#tab-bar-appearance--colors) +options. + +Styling in this context refers to how the edges of the tabs and the new tab button are rendered. +The default is simply a space character but you can use any sequence of formatted text produced +by the [wezterm.format](../wezterm/format.md) function. + +The defaults for each of these styles is simply a space. For each element, the foreground +and background colors are set as per the tab bar colors you've configured. + +The available elements are: + +* `active_tab_left`, `active_tab_right` - the left and right sides of the active tab +* `inactive_tab_left`, `inactive_tab_right` - the left and right sides of inactive tabs +* `inactive_tab_hover_left`, `inactive_tab_hover_right` - the left and right sides of inactive tabs in the hover state +* `new_tab_left`, `new_tab_right` - the left and right sides of the new tab `+` button +* `new_tab_hover_left`, `new_tab_hover_right` - the left and right sides of the new tab `+` button in the hover state. + +This example changes the tab edges to the PowerLine arrow symbols: + +Demonstrating setting the styling of the left and right tab edges + +```lua +local wezterm = require 'wezterm'; + +-- The filled in variant of the < symbol +local SOLID_LEFT_ARROW = utf8.char(0xe0b2) + +-- The filled in variant of the > symbol +local SOLID_RIGHT_ARROW = utf8.char(0xe0b0) + +return { + tab_bar_style = { + active_tab_left = wezterm.format({ + {Background={Color="#0b0022"}}, + {Foreground={Color="#2b2042"}}, + {Text=SOLID_LEFT_ARROW}, + }), + active_tab_right = wezterm.format({ + {Background={Color="#0b0022"}}, + {Foreground={Color="#2b2042"}}, + {Text=SOLID_RIGHT_ARROW}, + }), + inactive_tab_left = wezterm.format({ + {Background={Color="#0b0022"}}, + {Foreground={Color="#1b1032"}}, + {Text=SOLID_LEFT_ARROW}, + }), + inactive_tab_right = wezterm.format({ + {Background={Color="#0b0022"}}, + {Foreground={Color="#1b1032"}}, + {Text=SOLID_RIGHT_ARROW}, + }), + } +} +``` + diff --git a/docs/screenshots/wezterm-tab-edge-styled.png b/docs/screenshots/wezterm-tab-edge-styled.png new file mode 100644 index 000000000..cb58729fe Binary files /dev/null and b/docs/screenshots/wezterm-tab-edge-styled.png differ