docs: document styling the tab bar elements
refs: https://github.com/wez/wezterm/issues/500
This commit is contained in:
1 parent
4ec48b1245
commit
9ddc2da625
3 files changed
+64
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
<img width="100%" height="100%" src="../../../screenshots/wezterm-tab-edge-styled.png"
|
||||
alt="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},
|
||||
}),
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Reference in new issue
Block a user