From b0d0e4c1be7c2466079dd05917e24db20e4d7c47 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Fri, 7 Apr 2023 13:09:26 -0700 Subject: [PATCH] docs: for integrated title buttons refs: https://github.com/wez/wezterm/pull/2722 refs: https://github.com/wez/wezterm/issues/1180 --- docs/changelog.md | 9 +++++- .../integrated_title_button_alignment.md | 13 ++++++++ .../config/integrated_title_button_color.md | 11 +++++++ .../config/integrated_title_button_style.md | 16 ++++++++++ .../lua/config/integrated_title_buttons.md | 32 +++++++++++++++++++ docs/config/lua/config/tab_bar_style.md | 12 +++++++ docs/config/lua/config/window_decorations.md | 11 +++++++ 7 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 docs/config/lua/config/integrated_title_button_alignment.md create mode 100644 docs/config/lua/config/integrated_title_button_color.md create mode 100644 docs/config/lua/config/integrated_title_button_style.md create mode 100644 docs/config/lua/config/integrated_title_buttons.md diff --git a/docs/changelog.md b/docs/changelog.md index 99b02b094..8f1ae18fb 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -52,7 +52,14 @@ As features stabilize some brief notes about them will accumulate here. [wezterm.default_ssh_domains()](config/lua/wezterm/default_ssh_domains.md) to obtain that same information and amend/extend it. * [display_pixel_geometry](config/lua/config/display_pixel_geometry.md) to specify subpixel antialiasing geometry. ?3422 -* In progress: integrated title and tab bar. Thanks to @yuraiz for getting things moving! #2722 +* Integrated title and tab bar. + See also [window_decorations](config/lua/config/window_decorations.md), + [integrated_title_button_style](config/lua/config/integrated_title_button_style.md), + [integrated_title_buttons](config/lua/config/integrated_title_buttons.md), + [integrated_title_button_alignment](config/lua/config/integrated_title_button_alignment.md) + [integrated_title_button_color](config/lua/config/integrated_title_button_color.md) and, + if you are using the retro tab bar, [tab_bar_style](config/lua/config/tab_bar_style.md). + Thanks to @yuraiz for getting things moving! #2722 #1180 * Lua: [gui_window:active_tab()](config/lua/window/active_tab.md), [gui_window:active_pane()](config/lua/window/active_pane.md) (surprise! this was already there, just undocumented!), [mux_window:active_tab()](config/lua/mux-window/active_tab.md), diff --git a/docs/config/lua/config/integrated_title_button_alignment.md b/docs/config/lua/config/integrated_title_button_alignment.md new file mode 100644 index 000000000..589261b83 --- /dev/null +++ b/docs/config/lua/config/integrated_title_button_alignment.md @@ -0,0 +1,13 @@ +# `integrated_title_button_alignment = "Right"` + +{{since('nightly')}} + +Configures the alignment of the set of window management buttons when +`window_decorations = "INTEGRATED_BUTTONS|RESIZE"`. + +Possible values are: + +* `"Left"` - the buttons are shown on the left side of the tab bar +* `"Right"` - the buttons are shown on the right side of the tab bar + + diff --git a/docs/config/lua/config/integrated_title_button_color.md b/docs/config/lua/config/integrated_title_button_color.md new file mode 100644 index 000000000..92f0cb513 --- /dev/null +++ b/docs/config/lua/config/integrated_title_button_color.md @@ -0,0 +1,11 @@ +# `integrated_title_button_color = "Auto"` + +{{since('nightly')}} + +Configures the color of the set of window management buttons when +`window_decorations = "INTEGRATED_BUTTONS|RESIZE"`. + +Possible values are: + +* `config.integrated_title_button_color = "Auto"` - automatically compute the color +* `config.integrated_title_button_color = "red"` - Use a custom color diff --git a/docs/config/lua/config/integrated_title_button_style.md b/docs/config/lua/config/integrated_title_button_style.md new file mode 100644 index 000000000..a485d5ba0 --- /dev/null +++ b/docs/config/lua/config/integrated_title_button_style.md @@ -0,0 +1,16 @@ +# `integrated_title_button_style = STYLE` + +{{since('nightly')}} + +Configures the visual style of the tabbar-integrated titlebar button +replacements that are shown when `window_decorations = +"INTEGRATED_BUTTONS|RESIZE"`. + +Possible styles are: + +* `"Windows"` - draw Windows-style buttons +* `"Gnome"` - draw Adwaita-style buttons +* `"MacOsNative"` - on macOS only, move the native macOS buttons into the tab bar. + +The default value is `"MacOsNative"` on macOS systems, but `"Windows"` on other +systems. diff --git a/docs/config/lua/config/integrated_title_buttons.md b/docs/config/lua/config/integrated_title_buttons.md new file mode 100644 index 000000000..42efe3176 --- /dev/null +++ b/docs/config/lua/config/integrated_title_buttons.md @@ -0,0 +1,32 @@ +# `integrated_title_button_style = BUTTONS` + +{{since('nightly')}} + +Configures the ordering and set of window management buttons to show when +`window_decorations = "INTEGRATED_BUTTONS|RESIZE"`. + +The value is a table listing the buttons. Each element can have one of +the following values: + +* `"Hide"` - the window hide or minimize button +* `"Maximize"` - the window maximize button +* `"Close"` - the window close button + +The default value is equivalent to: + +```lua +config.integrated_title_buttons = { 'Hide', 'Maximize', 'Close' } +``` + +You can change the order by listing them in a different order: + +```lua +config.integrated_title_buttons = { 'Close', 'Maximize', 'Hide' } +``` + +or remove buttons you don't want: + +```lua +config.integrated_title_buttons = { 'Close' } +``` + diff --git a/docs/config/lua/config/tab_bar_style.md b/docs/config/lua/config/tab_bar_style.md index 5cbdc4aab..822d20614 100644 --- a/docs/config/lua/config/tab_bar_style.md +++ b/docs/config/lua/config/tab_bar_style.md @@ -70,3 +70,15 @@ config.tab_bar_style = { } ``` +#### Retro Tab Bar with Integrated Window Management Buttons + +{{since('nightly')}} + +When using [`window_decorations = +"INTEGRATED_BUTTONS|RESIZE"`](window_decorations.md), you can +control how the different buttons are drawn for the retro tab bar: + +* `window_hide`, `window_hide_hover` - the minimize/hide button +* `window_maximize`, `window_maximize_hover` - the maximize button +* `window_close`, `window_close_hover` - the close button + diff --git a/docs/config/lua/config/window_decorations.md b/docs/config/lua/config/window_decorations.md index 218c98d40..ce0c5a7b7 100644 --- a/docs/config/lua/config/window_decorations.md +++ b/docs/config/lua/config/window_decorations.md @@ -24,6 +24,17 @@ The value is a set of of flags: [window_background_opacity](../../appearance.md#window-background-opacity) is set to less than `1.0`. +{{since('nightly', outline=true)}} + * `window_decorations = "INTEGRATED_BUTTONS|RESIZE"` - place window + management buttons (minimize, maximize, close) into the tab bar + instead of showing a title bar. + + See also [integrated_title_button_style](integrated_title_button_style.md), + [integrated_title_buttons](integrated_title_buttons.md), + [integrated_title_button_alignment](integrated_title_button_alignment.md) + [integrated_title_button_color](integrated_title_button_color.md) and, + if you are using the retro tab bar, [tab_bar_style](tab_bar_style.md). + On X11 and Wayland, the windowing system may override the window decorations. When the titlebar is disabled you can drag the window using the tab bar if it