2020-01-14 09:20:53 +03:00
|
|
|
### Color Scheme
|
|
|
|
|
2022-08-09 17:46:24 +03:00
|
|
|
WezTerm ships with over 700 color schemes available from
|
|
|
|
[iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes#screenshots),
|
|
|
|
[base16](https://github.com/chriskempson/base16-schemes-source),
|
|
|
|
[Gogh](https://gogh-co.github.io/Gogh/) and
|
|
|
|
[terminal.sexy](https://terminal.sexy/) and a couple of other locations.
|
|
|
|
|
2020-06-21 05:06:06 +03:00
|
|
|
You can select a color scheme with a line like this:
|
2020-01-14 09:20:53 +03:00
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
local config = {}
|
|
|
|
|
|
|
|
config.color_scheme = 'Batman'
|
|
|
|
|
|
|
|
return config
|
2020-01-14 09:20:53 +03:00
|
|
|
```
|
|
|
|
|
2020-10-20 10:55:35 +03:00
|
|
|
You can find a list of available color schemes and screenshots
|
|
|
|
in [The Color Schemes Section](../colorschemes/index.md).
|
2020-01-14 09:20:53 +03:00
|
|
|
|
2023-02-07 06:32:37 +03:00
|
|
|
If you'd like to automatically adjust your color scheme based on the
|
|
|
|
system dark mode or light mode appearance, see the example in
|
|
|
|
[wezterm.gui.get_appearance()](lua/wezterm.gui/get_appearance.md)
|
|
|
|
|
2023-03-17 19:29:38 +03:00
|
|
|
!!! note
|
|
|
|
if you are using multiplexing with ssh or tls domains, the color scheme
|
|
|
|
is controlled by the config file on the multiplexer server side. This is
|
|
|
|
because the palette is an attribute of the terminal emulation and that state
|
|
|
|
lives on the multiplexer server.*
|
2023-01-23 08:06:33 +03:00
|
|
|
|
2022-08-20 21:48:22 +03:00
|
|
|
### Precedence of `colors` vs `color_schemes`
|
|
|
|
|
|
|
|
The `color_scheme` option takes precedence over the `colors` section below,
|
|
|
|
and is mutually exclusive with it. If you want to merge/override colors
|
2022-08-21 03:06:32 +03:00
|
|
|
you need to use [wezterm.color.get_default_colors()](lua/wezterm.color/get_default_colors.md) and explicitly merge them.
|
2022-08-20 21:48:22 +03:00
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20220903-194523-3bb1ed61')}}
|
2022-08-20 21:48:22 +03:00
|
|
|
|
|
|
|
The behavior has been changed so that the `color_scheme` you have selected, if
|
|
|
|
any, is used to define the colors, and then any colors you define in the
|
|
|
|
`colors` section will override those colors.
|
2020-01-14 09:20:53 +03:00
|
|
|
|
|
|
|
### Defining your own colors
|
|
|
|
|
2022-08-20 21:48:22 +03:00
|
|
|
You can specify the color palette using the `colors` configuration section.
|
2019-12-30 07:41:08 +03:00
|
|
|
|
|
|
|
You can configure colors with a section like this. In addition to specifying
|
|
|
|
[SVG/CSS3 color names](https://docs.rs/palette/0.4.1/palette/named/index.html#constants),
|
|
|
|
you can use `#RRGGBB` to specify a color code using the
|
|
|
|
usual hex notation; eg: `#000000` is equivalent to `black`:
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
local wezterm = require 'wezterm'
|
|
|
|
local config = {}
|
|
|
|
|
|
|
|
config.colors = {
|
|
|
|
-- The default text color
|
|
|
|
foreground = 'silver',
|
|
|
|
-- The default background color
|
|
|
|
background = 'black',
|
|
|
|
|
|
|
|
-- Overrides the cell background color when the current cell is occupied by the
|
|
|
|
-- cursor and the cursor style is set to Block
|
|
|
|
cursor_bg = '#52ad70',
|
|
|
|
-- Overrides the text color when the current cell is occupied by the cursor
|
|
|
|
cursor_fg = 'black',
|
|
|
|
-- Specifies the border color of the cursor when the cursor style is set to Block,
|
|
|
|
-- or the color of the vertical or horizontal bar when the cursor style is set to
|
|
|
|
-- Bar or Underline.
|
|
|
|
cursor_border = '#52ad70',
|
|
|
|
|
|
|
|
-- the foreground color of selected text
|
|
|
|
selection_fg = 'black',
|
|
|
|
-- the background color of selected text
|
|
|
|
selection_bg = '#fffacd',
|
|
|
|
|
|
|
|
-- The color of the scrollbar "thumb"; the portion that represents the current viewport
|
|
|
|
scrollbar_thumb = '#222222',
|
|
|
|
|
|
|
|
-- The color of the split lines between panes
|
|
|
|
split = '#444444',
|
|
|
|
|
|
|
|
ansi = {
|
|
|
|
'black',
|
|
|
|
'maroon',
|
|
|
|
'green',
|
|
|
|
'olive',
|
|
|
|
'navy',
|
|
|
|
'purple',
|
|
|
|
'teal',
|
|
|
|
'silver',
|
2022-07-19 17:54:31 +03:00
|
|
|
},
|
2023-03-20 04:26:21 +03:00
|
|
|
brights = {
|
|
|
|
'grey',
|
|
|
|
'red',
|
|
|
|
'lime',
|
|
|
|
'yellow',
|
|
|
|
'blue',
|
|
|
|
'fuchsia',
|
|
|
|
'aqua',
|
|
|
|
'white',
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Arbitrary colors of the palette in the range from 16 to 255
|
|
|
|
indexed = { [136] = '#af8700' },
|
|
|
|
|
|
|
|
-- Since: 20220319-142410-0fcdea07
|
|
|
|
-- When the IME, a dead key or a leader key are being processed and are effectively
|
|
|
|
-- holding input pending the result of input composition, change the cursor
|
|
|
|
-- to this color to give a visual cue about the compose state.
|
|
|
|
compose_cursor = 'orange',
|
|
|
|
|
|
|
|
-- Colors for copy_mode and quick_select
|
|
|
|
-- available since: 20220807-113146-c2fee766
|
|
|
|
-- In copy_mode, the color of the active text is:
|
|
|
|
-- 1. copy_mode_active_highlight_* if additional text was selected using the mouse
|
|
|
|
-- 2. selection_* otherwise
|
|
|
|
copy_mode_active_highlight_bg = { Color = '#000000' },
|
|
|
|
-- use `AnsiColor` to specify one of the ansi color palette values
|
|
|
|
-- (index 0-15) using one of the names "Black", "Maroon", "Green",
|
|
|
|
-- "Olive", "Navy", "Purple", "Teal", "Silver", "Grey", "Red", "Lime",
|
|
|
|
-- "Yellow", "Blue", "Fuchsia", "Aqua" or "White".
|
|
|
|
copy_mode_active_highlight_fg = { AnsiColor = 'Black' },
|
|
|
|
copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
|
|
|
|
copy_mode_inactive_highlight_fg = { AnsiColor = 'White' },
|
|
|
|
|
|
|
|
quick_select_label_bg = { Color = 'peru' },
|
|
|
|
quick_select_label_fg = { Color = '#ffffff' },
|
|
|
|
quick_select_match_bg = { AnsiColor = 'Navy' },
|
|
|
|
quick_select_match_fg = { Color = '#ffffff' },
|
2020-04-07 02:32:16 +03:00
|
|
|
}
|
2023-03-20 04:26:21 +03:00
|
|
|
|
|
|
|
return config
|
2019-12-30 07:41:08 +03:00
|
|
|
```
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20220101-133340-7edc5b5a')}}
|
2021-12-20 20:06:43 +03:00
|
|
|
|
|
|
|
You may specify colors in the HSL color space, if you prefer that over RGB, by using:
|
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.colors = {
|
|
|
|
-- the first number is the hue measured in degrees with a range
|
|
|
|
-- of 0-360.
|
|
|
|
-- The second number is the saturation measured in percentage with
|
|
|
|
-- a range of 0-100.
|
|
|
|
-- The third number is the lightness measured in percentage with
|
|
|
|
-- a range of 0-100.
|
|
|
|
foreground = 'hsl:235 100 50',
|
2021-12-20 20:06:43 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20220319-142410-0fcdea07')}}
|
2022-02-06 17:29:33 +03:00
|
|
|
|
2022-02-06 18:20:56 +03:00
|
|
|
Colors now also accept the following CSS-style color specifications:
|
|
|
|
|
|
|
|
```
|
|
|
|
rgb(0,255,0)
|
|
|
|
rgb(0% 100% 0%)
|
|
|
|
rgb(0 255 0 / 100%)
|
|
|
|
rgba(0,255,0,1)
|
|
|
|
hsl(120,100%,50%)
|
|
|
|
hsl(120deg 100% 50%)
|
|
|
|
hsl(-240 100% 50%)
|
|
|
|
hsl(-240deg 100% 50%)
|
|
|
|
hsl(0.3333turn 100% 50%)
|
|
|
|
hsl(133.333grad 100% 50%)
|
|
|
|
hsl(2.0944rad 100% 50%)
|
|
|
|
hsla(120,100%,50%,100%)
|
|
|
|
hwb(120 0% 0%)
|
|
|
|
hwb(480deg 0% 0% / 100%)
|
|
|
|
hsv(120,100%,100%)
|
|
|
|
hsv(120deg 100% 100% / 100%)
|
|
|
|
```
|
|
|
|
|
|
|
|
The alpha value is ignored except when used with `selection_fg` and
|
|
|
|
`selection_bg`:
|
2022-02-06 17:29:33 +03:00
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.colors = {
|
|
|
|
-- Make the selection text color fully transparent.
|
|
|
|
-- When fully transparent, the current text color will be used.
|
|
|
|
selection_fg = 'none',
|
|
|
|
-- Set the selection background color with alpha.
|
|
|
|
-- When selection_bg is transparent, it will be alpha blended over
|
|
|
|
-- the current cell background color, rather than replace it
|
|
|
|
selection_bg = 'rgba(50% 50% 50% 50%)',
|
2022-02-06 17:29:33 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
### Defining a Color Scheme in your `.wezterm.lua`
|
2020-01-14 09:20:53 +03:00
|
|
|
|
|
|
|
If you'd like to keep a couple of color schemes handy in your configuration
|
2020-04-07 02:32:16 +03:00
|
|
|
file, rather than filling out the `colors` section, place it in a
|
2020-01-14 09:20:53 +03:00
|
|
|
`color_schemes` section as shown below; you can then reference it using the
|
|
|
|
`color_scheme` setting.
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
Color schemes names that you define in your `wezterm.lua` take precedence
|
2020-01-14 09:20:53 +03:00
|
|
|
over all other color schemes.
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
All of the settings available from the `colors` section are available
|
2020-01-14 09:20:53 +03:00
|
|
|
to use in the `color_schemes` sections.
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.color_scheme = 'Red Scheme'
|
2020-04-07 02:32:16 +03:00
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
config.color_schemes = {
|
|
|
|
['Red Scheme'] = {
|
|
|
|
background = 'red',
|
|
|
|
},
|
|
|
|
['Blue Scheme'] = {
|
|
|
|
background = 'blue',
|
2020-04-07 02:32:16 +03:00
|
|
|
},
|
|
|
|
}
|
2020-01-14 09:20:53 +03:00
|
|
|
```
|
|
|
|
|
2022-01-02 04:11:59 +03:00
|
|
|
See also [wezterm.get_builtin_color_schemes()](lua/wezterm/get_builtin_color_schemes.md) for
|
|
|
|
some more advanced examples, such as picking a random color scheme, or deriving from a
|
|
|
|
builting color scheme.
|
|
|
|
|
2020-01-14 09:20:53 +03:00
|
|
|
### Defining a Color Scheme in a separate file
|
|
|
|
|
|
|
|
If you'd like to factor your color schemes out into separate files, you
|
|
|
|
can create a file with a `[colors]` section; take a look at [one of
|
2021-02-04 08:31:32 +03:00
|
|
|
the available color schemes for an example](https://github.com/wez/wezterm/blob/main/assets/colors/Builtin%20Dark.toml).
|
2020-01-14 09:20:53 +03:00
|
|
|
|
2020-10-31 08:56:32 +03:00
|
|
|
It is recommended that you place your custom scheme in a directory
|
|
|
|
named `$HOME/.config/wezterm/colors` if you're on a POSIX system.
|
|
|
|
|
|
|
|
On a Windows system, `wezterm` will search for schemes in a directory
|
|
|
|
named `colors` that is in the same directory as the `wezterm.exe`.
|
|
|
|
|
2021-02-12 08:33:22 +03:00
|
|
|
If you wish to place your color scheme files in some other location, then you
|
2020-10-31 08:56:32 +03:00
|
|
|
will need to instruct wezterm where to look for your scheme files; the
|
|
|
|
`color_scheme_dirs` setting specifies a list of directories to be searched:
|
2020-01-14 09:20:53 +03:00
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.color_scheme_dirs = { '/some/path/to/my/color/schemes' }
|
2020-01-14 09:20:53 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Color scheme names that are defined in files in your `color_scheme_dirs` list
|
|
|
|
take precedence over the built-in color schemes.
|
|
|
|
|
|
|
|
### Dynamic Color Escape Sequences
|
|
|
|
|
|
|
|
Wezterm supports dynamically changing its color palette via escape sequences.
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2020-01-14 09:20:53 +03:00
|
|
|
[The dynamic-colors directory](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/dynamic-colors)
|
|
|
|
of the color scheme repo contains shell scripts that can change the color
|
|
|
|
scheme immediately on the fly. This can be used in your own scripts to alter
|
|
|
|
the terminal appearance programmatically:
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
```console
|
2019-12-30 07:41:08 +03:00
|
|
|
$ git clone https://github.com/mbadolato/iTerm2-Color-Schemes.git
|
|
|
|
$ cd iTerm2-Color-Schemes/dynamic-colors
|
|
|
|
$ for scheme in *.sh ; do ; echo $scheme ; \
|
|
|
|
bash "$scheme" ; ../tools/screenshotTable.sh; sleep 0.5; done
|
|
|
|
```
|
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
<video width="80%" controls src="../screenshots/wezterm-dynamic-colors.mp4" loop></video>
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2020-05-30 05:18:32 +03:00
|
|
|
### Tab Bar Appearance & Colors
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2022-01-02 03:14:33 +03:00
|
|
|
The tab bar has two modes; the default is a native looking style, but
|
2023-10-01 18:43:51 +03:00
|
|
|
it is also possible to enable a retro aesthetic. The configuration
|
2022-01-02 03:14:33 +03:00
|
|
|
for the two styles is broadly similar, but there are a few different
|
|
|
|
details.
|
|
|
|
|
|
|
|
* [use_fancy_tab_bar](lua/config/use_fancy_tab_bar.md) option controls
|
|
|
|
which tab bar style is used.
|
|
|
|
* [enable_tab_bar](lua/config/enable_tab_bar.md) option control
|
|
|
|
whether the tab bar is used at all.
|
|
|
|
* [hide_tab_bar_if_only_one_tab](lua/config/hide_tab_bar_if_only_one_tab.md) option
|
|
|
|
causes the tab bar to be hidden when there is only a single tab.
|
|
|
|
* [tab_bar_at_bottom](lua/config/tab_bar_at_bottom.md) places the tab
|
|
|
|
bar at the bottom of the window instead of the top
|
2022-01-02 03:35:27 +03:00
|
|
|
* [tab_max_width](lua/config/tab_max_width.md) sets the maximum width, measured in cells,
|
|
|
|
of a given tab when using retro tab mode.
|
2022-01-02 03:14:33 +03:00
|
|
|
|
|
|
|
#### Native (Fancy) Tab Bar appearance
|
|
|
|
|
|
|
|
The following options affect the fancy tab bar:
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.window_frame = {
|
|
|
|
-- The font used in the tab bar.
|
|
|
|
-- Roboto Bold is the default; this font is bundled
|
|
|
|
-- with wezterm.
|
|
|
|
-- Whatever font is selected here, it will have the
|
|
|
|
-- main font setting appended to it to pick up any
|
|
|
|
-- fallback fonts you may have used there.
|
|
|
|
font = wezterm.font { family = 'Roboto', weight = 'Bold' },
|
|
|
|
|
|
|
|
-- The size of the font in the tab bar.
|
2023-05-24 12:41:35 +03:00
|
|
|
-- Default to 10.0 on Windows but 12.0 on other systems
|
2023-03-20 04:26:21 +03:00
|
|
|
font_size = 12.0,
|
|
|
|
|
|
|
|
-- The overall background color of the tab bar when
|
|
|
|
-- the window is focused
|
|
|
|
active_titlebar_bg = '#333333',
|
|
|
|
|
|
|
|
-- The overall background color of the tab bar when
|
|
|
|
-- the window is not focused
|
|
|
|
inactive_titlebar_bg = '#333333',
|
|
|
|
}
|
2022-01-16 22:24:38 +03:00
|
|
|
|
2023-04-16 19:09:20 +03:00
|
|
|
config.colors = {
|
2023-03-20 04:26:21 +03:00
|
|
|
tab_bar = {
|
|
|
|
-- The color of the inactive tab bar edge/divider
|
|
|
|
inactive_tab_edge = '#575757',
|
2022-01-02 03:14:33 +03:00
|
|
|
},
|
|
|
|
}
|
|
|
|
```
|
2020-05-30 05:18:32 +03:00
|
|
|
|
2022-01-02 03:14:33 +03:00
|
|
|
In addition, the tab bar colors mentioned below also apply
|
|
|
|
to the items displayed in the tab bar.
|
2020-05-30 05:18:32 +03:00
|
|
|
|
2022-01-02 03:14:33 +03:00
|
|
|
#### Retro Tab Bar appearance
|
|
|
|
|
|
|
|
The following options control the appearance of the tab bar:
|
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.colors = {
|
|
|
|
tab_bar = {
|
|
|
|
-- The color of the strip that goes along the top of the window
|
|
|
|
-- (does not apply when fancy tab bar is in use)
|
|
|
|
background = '#0b0022',
|
|
|
|
|
|
|
|
-- The active tab is the one that has focus in the window
|
|
|
|
active_tab = {
|
|
|
|
-- The color of the background area for the tab
|
|
|
|
bg_color = '#2b2042',
|
|
|
|
-- The color of the text for the tab
|
|
|
|
fg_color = '#c0c0c0',
|
|
|
|
|
|
|
|
-- Specify whether you want "Half", "Normal" or "Bold" intensity for the
|
|
|
|
-- label shown for this tab.
|
|
|
|
-- The default is "Normal"
|
|
|
|
intensity = 'Normal',
|
|
|
|
|
|
|
|
-- Specify whether you want "None", "Single" or "Double" underline for
|
|
|
|
-- label shown for this tab.
|
|
|
|
-- The default is "None"
|
|
|
|
underline = 'None',
|
|
|
|
|
|
|
|
-- Specify whether you want the text to be italic (true) or not (false)
|
|
|
|
-- for this tab. The default is false.
|
|
|
|
italic = false,
|
|
|
|
|
|
|
|
-- Specify whether you want the text to be rendered with strikethrough (true)
|
|
|
|
-- or not for this tab. The default is false.
|
|
|
|
strikethrough = false,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Inactive tabs are the tabs that do not have focus
|
|
|
|
inactive_tab = {
|
|
|
|
bg_color = '#1b1032',
|
|
|
|
fg_color = '#808080',
|
|
|
|
|
|
|
|
-- The same options that were listed under the `active_tab` section above
|
|
|
|
-- can also be used for `inactive_tab`.
|
|
|
|
},
|
|
|
|
|
|
|
|
-- You can configure some alternate styling when the mouse pointer
|
|
|
|
-- moves over inactive tabs
|
|
|
|
inactive_tab_hover = {
|
|
|
|
bg_color = '#3b3052',
|
|
|
|
fg_color = '#909090',
|
|
|
|
italic = true,
|
|
|
|
|
|
|
|
-- The same options that were listed under the `active_tab` section above
|
|
|
|
-- can also be used for `inactive_tab_hover`.
|
|
|
|
},
|
|
|
|
|
|
|
|
-- The new tab button that let you create new tabs
|
|
|
|
new_tab = {
|
|
|
|
bg_color = '#1b1032',
|
|
|
|
fg_color = '#808080',
|
|
|
|
|
|
|
|
-- The same options that were listed under the `active_tab` section above
|
|
|
|
-- can also be used for `new_tab`.
|
|
|
|
},
|
|
|
|
|
|
|
|
-- You can configure some alternate styling when the mouse pointer
|
|
|
|
-- moves over the new tab button
|
|
|
|
new_tab_hover = {
|
|
|
|
bg_color = '#3b3052',
|
|
|
|
fg_color = '#909090',
|
|
|
|
italic = true,
|
|
|
|
|
|
|
|
-- The same options that were listed under the `active_tab` section above
|
|
|
|
-- can also be used for `new_tab_hover`.
|
2022-07-19 17:54:31 +03:00
|
|
|
},
|
|
|
|
},
|
2020-04-07 02:32:16 +03:00
|
|
|
}
|
2019-12-30 07:41:08 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
### Window Padding
|
|
|
|
|
2021-10-08 05:26:22 +03:00
|
|
|
You may add padding around the edges of the terminal area.
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2021-10-08 05:26:22 +03:00
|
|
|
[See the window_padding docs for more info](lua/config/window_padding.md)
|
2019-12-30 07:41:08 +03:00
|
|
|
|
2020-10-25 22:17:25 +03:00
|
|
|
## Styling Inactive Panes
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20201031-154415-9614e117')}}
|
2020-10-25 22:17:25 +03:00
|
|
|
|
2020-12-23 19:51:25 +03:00
|
|
|
To make it easier to see which pane is active, the inactive panes are dimmed
|
|
|
|
and de-saturated slightly.
|
2020-10-25 22:17:25 +03:00
|
|
|
|
2020-12-23 19:51:25 +03:00
|
|
|
You can specify your own transformation to the pane colors with a hue,
|
|
|
|
saturation, brightness (HSB) multipler.
|
2020-10-25 22:17:25 +03:00
|
|
|
|
2020-12-23 19:51:25 +03:00
|
|
|
In this example, inactive panes will be slightly de-saturated and dimmed;
|
|
|
|
this is the default configuration:
|
2020-10-25 22:17:25 +03:00
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.inactive_pane_hsb = {
|
|
|
|
saturation = 0.9,
|
|
|
|
brightness = 0.8,
|
2020-10-25 22:17:25 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
The transform works by converting the RGB colors to HSV values and
|
|
|
|
then multiplying the HSV by the numbers specified in `inactive_pane_hsb`.
|
|
|
|
|
|
|
|
Modifying the hue changes the hue of the color by rotating it through the color
|
|
|
|
wheel. It is not as useful as the other components, but is available "for free"
|
|
|
|
as part of the colorspace conversion.
|
|
|
|
|
|
|
|
Modifying the saturation can add or reduce the amount of "colorfulness". Making
|
|
|
|
the value smaller can make it appear more washed out.
|
|
|
|
|
|
|
|
Modifying the brightness can be used to dim or increase the perceived amount of
|
|
|
|
light.
|
|
|
|
|
|
|
|
The range of these values is 0.0 and up; they are used to multiply the existing
|
|
|
|
values, so the default of 1.0 preserves the existing component, whilst 0.5 will
|
|
|
|
reduce it by half, and 2.0 will double the value.
|
|
|
|
|
2020-10-19 00:32:17 +03:00
|
|
|
## Window Background Image
|
|
|
|
|
2023-03-16 05:22:51 +03:00
|
|
|
![Screenshot](../screenshots/wezterm-vday-screenshot.png)
|
2020-10-19 18:59:53 +03:00
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20201031-154415-9614e117')}}
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
You can attach an image to the background of the wezterm window:
|
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.window_background_image = '/path/to/wallpaper.jpg'
|
2020-10-19 00:32:17 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
If the path is a relative path then it will be expanded relative
|
|
|
|
to the directory containing your `wezterm.lua` config file.
|
|
|
|
|
|
|
|
PNG, JPEG, GIF, BMP, ICO, TIFF, PNM, DDS, TGA and farbfeld files
|
2021-08-14 22:44:38 +03:00
|
|
|
can be loaded. Animated GIF and PNG files will animate while
|
|
|
|
the window has focus.
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
The image will be scaled to fit the window contents. Very large
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
images may decrease render performance and take up VRAM from the
|
|
|
|
GPU, so you may wish to resize the image file before using it.
|
|
|
|
|
|
|
|
You can optionally transform the background image by specifying
|
|
|
|
a hue, saturation, brightness multiplier:
|
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.window_background_image = '/path/to/wallpaper.jpg'
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
config.window_background_image_hsb = {
|
|
|
|
-- Darken the background image by reducing it to 1/3rd
|
|
|
|
brightness = 0.3,
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
-- You can adjust the hue by scaling its value.
|
|
|
|
-- a multiplier of 1.0 leaves the value unchanged.
|
|
|
|
hue = 1.0,
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
|
2023-03-20 04:26:21 +03:00
|
|
|
-- You can adjust the saturation also.
|
|
|
|
saturation = 1.0,
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
}
|
|
|
|
```
|
2020-10-19 00:32:17 +03:00
|
|
|
|
2020-10-25 22:17:25 +03:00
|
|
|
See [Styling Inactive Panes](#style-inactive-panes) for more information
|
|
|
|
on hue, saturation, brigthness transformations.
|
|
|
|
|
2022-11-22 04:12:44 +03:00
|
|
|
If you'd like to have control over scaling, tiling/repeating, scrolling
|
|
|
|
behavior and more, take a look at the more power
|
|
|
|
[background](lua/config/background.md) configuration option.
|
|
|
|
|
2021-08-14 03:38:33 +03:00
|
|
|
## Window Background Gradient
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20210814-124438-54e29167')}}
|
2021-08-14 03:38:33 +03:00
|
|
|
|
2023-03-16 05:22:51 +03:00
|
|
|
![Gradient](../screenshots/radial-gradient.png)
|
2021-08-14 03:38:33 +03:00
|
|
|
|
|
|
|
See [window_background_gradient](lua/config/window_background_gradient.md)
|
|
|
|
for configuration information on gradients.
|
|
|
|
|
2020-10-19 00:32:17 +03:00
|
|
|
## Window Background Opacity
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20201031-154415-9614e117')}}
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
If your Operating System provides Compositing support then WezTerm is able to
|
|
|
|
specify the alpha channel value for the background content, rendering the
|
2021-04-03 15:14:02 +03:00
|
|
|
window background translucent (some refer to this as transparent rather than
|
|
|
|
translucent) and causing the windows/desktop behind it to show through the
|
|
|
|
window.
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
macOS, Windows and Wayland support compositing out of the box. X11 may require
|
|
|
|
installing or configuring a compositing window manager. XWayland under
|
|
|
|
Mutter/Wayland also works without any additional configuration.
|
|
|
|
|
|
|
|
`window_background_opacity` specifies the alpha channel value
|
|
|
|
with floating point numbers in the range `0.0` (meaning completely
|
2021-04-03 15:14:02 +03:00
|
|
|
translucent/transparent) through to `1.0` (meaning completely opaque).
|
2020-10-19 00:32:17 +03:00
|
|
|
|
2021-04-03 15:14:02 +03:00
|
|
|
Setting this to a value other than the default `1.0` may impact render
|
|
|
|
performance.
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.window_background_opacity = 1.0
|
2020-10-19 00:32:17 +03:00
|
|
|
```
|
|
|
|
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
## Text Background Opacity
|
2020-10-19 00:32:17 +03:00
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20201031-154415-9614e117')}}
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
When using a background image or background opacity, the image content can
|
|
|
|
have relatively low contrast with respect to the text you are trying to
|
|
|
|
read in your terminal.
|
|
|
|
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
The `text_background_opacity` setting specifies the alpha channel value to use
|
|
|
|
for the background color of cells other than the default background color.
|
2020-10-19 00:32:17 +03:00
|
|
|
|
wezterm: revise opacity configuration
This commit revises the opacity configuration to make it more
consistently applied.
* `window_background_opacity` controls the overall window capacity,
whether a background image is present or not.
* When a background image is present, or if the window is transparent,
then text whose background color is the default background is
changed to have a fully transparent background.
* `text_background_opacity` controls the alpha channel value for
text whose background color is NOT the default background.
It defaults to 1.0 (fully opaque), but can be set to be
transparent by setting it to a number between 0.0 and 1.0.
* The inactive pane hue, saturation, brightness multipliers
have been factored out into their own struct which changes
that set of options to:
```lua
return {
inactive_pane_hsb = {
hue = 1.0,
saturation = 1.0,
brightness = 1.0,
},
}
```
* `window_background_image_hsb` is a new option that can apply
a hue, saturation, brightness transformation to a background
image. This is primarily useful to make a background image
darker:
```lua
return {
window_background_image = "/some/pic.png",
window_background_image_hsb = {
brightness = 0.3,
},
}
```
refs: #302
refs: #297
2020-10-24 09:16:00 +03:00
|
|
|
The default for this setting is `1.0`, which means that the background
|
|
|
|
color is fully opaque.
|
2020-10-19 00:32:17 +03:00
|
|
|
|
|
|
|
The range of values permitted are `0.0` (completely translucent)
|
|
|
|
through to `1.0` (completely opaque).
|
|
|
|
|
|
|
|
```lua
|
2023-03-20 04:26:21 +03:00
|
|
|
config.text_background_opacity = 0.3
|
2020-10-19 00:32:17 +03:00
|
|
|
```
|
|
|
|
|