656 Commits
Author SHA1 Message Date
Phil Gore 2658f629cd macos: fix dictation support, with new configs for preview text (#7453)
closes: #4592 & #5180
2026-09-15 13:51:23 +02:00
Benoit de Chezelles 5140f9893c misc: fmt.. 2026-08-29 16:21:55 +02:00
Huy PhungandBenoit de Chezelles ae46d3a0bb fonts: Improve weight defaults: normal→dim/bold is more visible (#8097)
refs: #8049 (with examples)

---------
Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
2026-08-29 16:16:36 +02:00
xtqqczze 78cd82dbba config: Replace winapi with windows-sys (#8098) 2026-08-26 11:37:11 +02:00
Rafael Steil 5c09609597 ui: Add command_palette_line_height config option (#8096) 2026-08-26 01:09:24 +02:00
Calle Helmertz 9554bdd04d feat: smart case search (#7385)
Add "smart-case" into the cycling of already existing search modes.

Fixes #6018
2026-07-31 08:32:02 +02:00
1Capito1andBenoit de Chezelles 6f3d3d84f2 wayland: Support blur via ext-background-effect-v1 protocol (#7615)
* Add ext-background-effect-v1 support for wayland
* Deprecate `kde_window_background_blur`; use `wayland_window_background_blur`
* Update changelog (replace old kde… option entry with wayland…)

---------

Co-authored-by: Benoit de Chezelles <benoit.dechezelles@gmail.com>
2026-07-13 18:57:32 +02:00
HuaGu-Dragon fff02ca501 perf: Simplify string case conversions to ASCII only (#7890) 2026-07-07 09:37:16 +02:00
Benoit de Chezelles eeb8097292 fix: Detect if running in WSL with icase 'microsoft' check (#7137) 2026-06-04 14:54:53 +02:00
Jeff QuastandWez Furlong 577474d89e Prevent "screen scraping", disable DECRQCRA (#7701)
* Security fix: prevent screen scraping

Problem
-------

DECRQCRA was added in 6cbb3ba43, for 9702d1cf5 (esctest integration) Sunday, March 17 2019.  Six days later, March 23 2019, although esctest was removed in c93f967bc, DECRQCRA remained enabled by default for all WezTerm releases since.

March 2023, @j4james mentioned WezTerm has this option enabled by default https://github.com/microsoft/terminal/issues/14974, "some people consider it a security risk"

September 2023, https://dgl.cx/2023/09/ansi-terminal-security#cursor-checksum article writes, "using DECRQCRA [..] potential attack here is reading what is displayed on the terminal before a user SSHes to a remote system."

By switching to "alternate screen", it also possible to recover last TUI display, such as contents of the file last opened in an editor.

Example CLI script scrapes screens '0' and '1' of WezTerm, https://github.com/jquast/blessed/blob/master/bin/screen-scrape.py

Solution
--------

Disable https://vt100.net/docs/vt510-rm/DECRQCRA.html by default, may be re-enabled by configuration.

---

Refs: https://github.com/wezterm/wezterm/pull/7701

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2026-03-31 04:00:28 -07:00
Linken Quy Dinh 598fb9ce1b max_fps config fix 2025-11-11 07:07:46 +00:00
Rebecca Turner bf9a2aeeba Fix mismatched_lifetime_syntaxes warnings
Fixes a bunch of warnings like this:

```
warning: hiding a lifetime that's elided elsewhere is confusing
   --> window/src/os/macos/window.rs:670:23
    |
670 |     fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
    |                       ^^^^^            ------------- the same lifetime is hidden here
    |                       |
    |                       the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
670 |     fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
    |                                                     ++++
```

This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
2025-09-09 07:05:12 -07:00
Wez Furlong b11cd7ae7e fixup split behavior with default_prog
https://github.com/wezterm/wezterm/pull/6850 changed the behavior
of spawning in such a way that if you had a default_prog and split
a pane, the default_prog you had set would not take effect.

This is because a later normalization stage would skip applying
resolving/applying the default_prog because it thought that the
command builder was already fully baked.

This commit allows that fixup logic to reason about the configured
default_prog (which may be different in a WSL context!) and fixup
the builder.

This is an alternative approach to resolving
https://github.com/wezterm/wezterm/issues/6955 for which a patch was
proprosed in https://github.com/wezterm/wezterm/pull/6972.  That PR
wouldn't be quite right because the underlying logic could consider the
default_prog from a domain-specific source, rather than the global
configuration.
2025-05-24 11:21:04 -07:00
mgpinf 4a32feaa7e feat: add configuration option for Launcher label bg and fg
Add below configuration option in config.colors:
- launcher_label_bg
- launcher_label_fg

If above mentioned options are not set in the configuration file then:
- launcher_label_bg defaults to default background color
- launcher_label_fg defaults to default foreground color
2025-05-11 09:59:01 -07:00
Wez Furlong 4a210168e1 add new text_min_contrast_ratio option
This can help improve readability by forcing the foreground
color luminance to adjust to increase the contrast ratio to
the specified value.
2025-05-10 09:29:08 -07:00
James HurstandWez Furlong af8d521ef6 feat: enforce minimum contrast ratio for reverse video cursor (#6584)
* feat: enforce minimum contrast ratio for reverse video cursor

* feat: add reverse_video_cursor_min_contrast to config

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-09 09:54:39 -07:00
parthandWez Furlong 4d6b83585f feat: Added support for window blur on KDE Wayland (#6905)
* added config flag for kde blur

* added deps for wayland-protocol-plasma

* added kde background blur

* keeping inner functions together

* updated docs with kde_blur

* added kde_blur ss to docs

* removed unneeded dep

* removed redundant default value for bool

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* updated default for kde_blur in config

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* Update docs/config/lua/config/kde_window_background_blur.md

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* Update blur logic in os/wayland/window.rs

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* simplified blur_manager creation in wayland/state.rs

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* removed unnecessary panic paths

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* removed unnecessary panic path

Co-authored-by: Wez Furlong <wez@wezfurlong.org>

* put the right screenshot for kde_blur

* fixed build issues

* reverted window/src/os/windows/window.rs

* fixed formatting

* Update window/src/os/windows/window.rs

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-04 06:29:27 -07:00
HAMANO TsukasaandWez Furlong 8ec1f2451c add cell_widths option #6289
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-03 06:56:33 -07:00
mgpinf 9606fa2569 Add font configuration option for ActivateCommandPalette, CharSelect, PaneSelect (#6696)
* feat: option to configure font for ActivateCommandPalette, CharSelect, PaneSelect

Add configuration option for font for the below entities:
- ActivateCommandPalette
- CharSelect
- PaneSelect

For the above entities, if the font is not set in configuration, it
defaults to the font resolved in config.window_frame.font. This is in
order to maintain existing behavior of using the font resolved in
config.window_frame.font

* docs: documentation for added configuration options

Add documentation for below configuration options:
- command_palette_font
- char_select_font
- pane_select_font

* refactor: rename EntityFont to Entity

* docs: add example configuration in char_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in pane_select_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* docs: add example configuration in command_palette_font

Apply changes mentioned in suggestion:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085165

* refactor: calculate make_bold in make_entity_font_impl method

* refactor: resolve font_size based on Entity

Since we can fetch font_size based on entity, we resolve it in
'make_entity_font_impl'. This removes the need to pass the pref_size
parameter

Apply changes mentioned in suggestions:
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085350
https://github.com/wezterm/wezterm/pull/6696#discussion_r1986085949
2025-03-09 15:34:32 -07:00
mgpinfandWez Furlong 413ebd5681 Add configuration option for InputSelector label background and foreground color (#6682)
* feat: add configuration option for InputSelector label bg and fg

Add below configuration option in config.colors:
- input_selector_label_bg
- input_selector_label_fg

If above mentioned options are not set in the configuration file then:
- input_selector_label_bg defaults to default background color
- input_selector_label_fg defaults to default foreground color

* docs: add InputSelector label bg, fg options to Colors & Appearance

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-09 04:29:13 -07:00
mgpinfandWez Furlong 46f74a5bf7 Add alphabet to launcher args (#6677)
* feat: add alphabet argument to ShowLauncherArgs

- The labels are now based on the provided argument or the default value
- The 'alphabet' string defaults to "1234567890abcdefghilmnopqrstuvwxyz"
- Optional argument 'alphabet' is added to 'ShowLauncherArgs'

* docs: update documentation for ShowLauncherArgs

* fix: push (max_label_len+3) whitespaces if always_fuzzy false in InputSelector

This is to handle the edge case in InputSelector when max_label_len is 2
and the labels shift one place to the left when entering fuzzy mode and
back one place to the right when exiting fuzzy mode.

* fix: push (max_label_len+3) whitespaces if 'FUZZY' not present

This is to handle the edge case in Launcher when max_label_len is 2
and the labels shift one place to the left when entering fuzzy mode and
back one place to the right when exiting fuzzy mode.

* feat: add configuration option for Launcher alphabet

- This is in order to be able to configure the alphabet for
  actions corresponding to KeyAssignment enums 'ShowLauncher',
  'ShowTabNavigator'
- If `launcher_alphabet` configuration option not set, the value
  defaults to '1234567890abcdefghilmnopqrstuvwxyz'

* docs: add launcher_alphabet documentation

* docs: update documentation for ShowLauncherArgs

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-08 10:22:11 -07:00
mgpinfandWez Furlong 2dda592ba6 Add Confirmation to Key assignment (#6707)
* feat: add Confirmation to KeyAssignment

This displays a confirmation menu similar to close menu.
An optional cancellation action that is triggered when the user
cancels/declines.

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-03-08 10:18:40 -07:00
mgpinf 85409e57a3 Option to disable attributes for non matching text in quick select mode (#6683)
* feat: optionally disable non-matching text attributes in Quick Select

Add a configuration option
'disable_attributes_for_non_matching_text_in_quick_select' that disables
all attributes for non-matching text in Quick Select Mode.
The default value for
'disable_attributes_for_non_matching_text_in_quick_select' is false

This resolves the issue https://github.com/wezterm/wezterm/issues/4022

* docs: documentation for disabling attributes for non matching text in QuickSelect

Add documentation for the below configuration option:
- `disable_attributes_for_non_matching_text_in_quick_select`

* feat: display quick select label and match in bold

* refactor: fetch colors from existing reference to config

* fix: reset additional attributes for non matching text

Reset additional below mentioned attributes to default for non matching
text if the configuration option
disable-attributes-for-non-matching-text-in-quick-select-mode is true
- Italic
- Blink
- StrikeThrough
- Invisible
- Hyperlink

* fix: update attributes to reset

* feat: add reset_attributes function in termwiz cell

Add reset_attributes function in termwiz cell
Use the above function to reset cell attributes for the cell

* refactor: update method name to clear_attributes

* termwiz: update version because public method has been added

Update termwiz version because a new method 'reset_attributes' has been
added in termwiz/src/cell.rs

* fix: update get_lines method in quickselect to be same as with_lines_mut

* termwiz: simpler method name, implementation to clear cell attributes

Use simpler method name and implementation as per suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966596988

* refactor: clear cell attributes for every line if flag is set

Clear attributes for every line if the configuration option
disable-attributes-for-non-matching-text-in-quick-select has been set
Partially implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966597826

* refactor: replace for loop with for_each method to iterate through cells

Partially implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966597826

* refactor: rename configuration option to quick_select_remove_styling

Rename option to remove styling in quick select from
'disable_attributes_for_non_matching_text_in_quick_select' to
'quick_select_remove_styling'
Implement changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966598496

* fix: remove bold attribute when displaying quick select label, match

This is in order to raise this in a separate PR

Suggestion mentioned here
https://github.com/wezterm/wezterm/pull/6683#issuecomment-2676394535

* docs: update documentation for quick_select_remove_styling

* termwiz: just bump minor part

Since the only change in termwiz is addition of a public method, it
should be forward compatible, so we can just bump the minor part

Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966600258

* fix: clear attributes for each cell in all lines in get_lines method

Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966848308

* fix: clear appdata for line after clearing attributes of each cell

Move call to clear appdata for line after the call to clear attributes
from each cell when configuration option 'quick_select_remove_styling'
is enabled
Apply changes mentioned in suggestion
https://github.com/wezterm/wezterm/pull/6683#discussion_r1966848015
2025-02-23 15:37:09 -07:00
Ryan Zimmermanandvolskaya c6b67877b6 Add option to extend the osx non-native fullscreen behind the notch to the top of the screen (#5759)
* Adding an option (disabled by default) to disable the notch avoidance so you can use the full screen if your terminal config already handles the notch.

Co-authored-by: volskaya <38878482+volskaya@users.noreply.github.com>
2025-02-22 08:17:33 -07:00
Wez Furlong 3b994de290 deps: remove once_cell in favor of std functionality 2025-02-12 10:00:31 -07:00
Wez Furlong edcdefda3b workspace-ify the deps
There have been a couple of attempts at this in the past, which
had some usability warts in what I recall as an earlier, less
useful set of features overall.

Whether that was collective misunderstanding at the time, or things
have gotten better since then, now is a good time to adopt the workspace
dep syntax, because wezterm has many crates to keep on top of, and
automation like dependabot can't see a lot of them.

This will help to manage the versions of deps in wezterm centrally.

Let's try this out in CI: the Cargo.lock changes here are minimal
(eliminated a second version of base64 from one crate, terminal_size
from another, and removed an explicit dep on serde_derive) so
hopefully this sails through on !linux.

closes: https://github.com/wezterm/wezterm/pull/6668
2025-02-12 09:43:36 -07:00
Wez Furlong 44866cc137 new: ConEmu progress reporting OSC sequence
This commit parses and captures the progress state as set by
ConEmu style progress reporting escape sequences.

Changes to the state will propagage through the mux via the
existing MuxNotification Alert system, and should also transit
across multiplexer connections.  However, there is no separate
multiplexer state transfer for the progress state, so reconnecting
to a mux in the middle of a progress sequence will show as None
for the progress state, until the next update occurs.

Aside from propgating and exposing the state to lua via PaneInformation
and a Pane::get_progress method, wezterm doesn't do anything with
the progress information at this time.

This commit includes an example of how you might customize your
tab title to reflect the progress in the active pane.

refs: https://github.com/wezterm/wezterm/issues/6581
2025-02-09 18:26:23 -07:00
mgpinf 4c32d6fd50 Add help_text and fuzzy_help_text arguments to ShowLauncherArgs (#6606)
* feat: add help_text, fuzzy_help_text arguments in ShowLauncherArgs

Add help_text, fuzzy_help_text optional arguments in ShowLauncherArgs.
Similar to description, fuzzy_description arguments present in
InputSelector.
If help_text argument is not provided, default value of `"Select an item
and press Enter=launch Esc=cancel  /=filter"` is displayed
If fuzzy_help_text argument is not provided, default value of `"Fuzzy
matching: "` is displayed

* docs: update documentation for ShowLauncherArgs

* perf: pass LauncherActionArgs struct rather than reference

Since fields are being cloned in the callee function, pass the struct
rather than reference to it.
2025-02-09 13:05:54 -07:00
nhurlockandWez Furlong b374d383ce QuickSelectArgs: optionally bypass custom action on paste (#6405)
* QuickSelectArgs: optionally bypass performing action on paste

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-02-08 19:38:40 -07:00
Shiphan 94a4252f28 Add config option to adjust window alignment 2025-02-08 15:34:15 -07:00
Bowei Zhang dd7ae90f1f fix: better handling of hyperlinks with parentheses 2025-02-08 14:14:28 -07:00
Wez Furlong 11c4b11669 s,wez/wezterm,wezterm/wezterm,
I moved the repo to an org of its own. Update various things
to reference the new location.
2025-02-07 13:08:01 -07:00
Wez Furlong 00644d4e1a update for new wezterm.org domain 2025-02-06 21:13:50 -07:00
Wez Furlong 74015a95c7 fix some warnings with rust 1.83
It's complaining about non-local impls and elided lifetimes
that have names.

I don't recall why I thought I needed these "dummy" enclosing
scopes, and they are most likely cargo-cult copypasta from
some other derive implementation that I used as inspiration.
2024-11-28 21:32:15 -07:00
Luis Mario Domenzain ed430415ee add X11 xmonad to tiling_desktop_environments 2024-10-07 10:37:14 -07:00
Sean Estabrooks 2b76c63bb6 Suppress compiler warnings, due to never type (!)
As per <https://github.com/rust-lang/rust/issues/123748>
! will no longer degrades into () which in this situation
breaks type deduction; so specify it explicitly.
2024-09-22 15:12:28 -07:00
Eduard Korchmar b59cc5b008 feat: add a way to spawn populated LineEditor
feat: support pre-filled content in prompts

docs: document new PromptInputLine parameter

fix: remove reset of line contents
2024-09-22 14:45:11 -07:00
mgpinfandWez Furlong 6a12dd1a13 Custom prompt for PromptInputLine (#6054)
* option to configure PromptInputLine prompt

- Introduces an option to set custom prompt text
- If 'prompt' not passed in parameters, default value of "> " used

* commit: update documentation for PromptInputLine

* Update docs/config/lua/keyassignment/PromptInputLine.md

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-09-22 10:55:55 -07:00
Wez Furlong 78849cc478 docs: changelog for #5996 2024-09-14 11:37:18 -07:00
x3roandWez Furlong 6a2e356156 Validate scrollback_lines to avoid crashes (#5996)
* Validate scrollback_lines to avoid crashes

I started using wezterm today, and I immediately tried to configure it
to use "infinite scrollback", as I use in iTerm2. From the configuration
I couldn't tell if there was a way to do this, so I just set it to a
really large number, hoping that would work. Interestingly this works
for very large numbers when the config is just being reloaded while the
terminal is running, but if you then try to restart the application it
crashes (tried to allocate like 100PB or something).

I then came across #1342 and thought "that's seems a bit too involved",
and decided that I probably don't need infinite scrollback, but just
kind of a large number. Through fair dice roll I determined `one billion - 1`
will probably suffice.

Now, this might not be the best solution, so I'm happy to get some feedback.
I was also thinking that it would be nice if one could just set it to `0`,
and then the applicatio determines a suitably large number for the amount of
RAM available, but a) I wasn't sure how this would be best implemented in the
confines of the current architecture, and b) I wasn't sure if it would be well
received.

Long story short, happy to hear your feedback.

* simplify slightly

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2024-09-14 11:33:53 -07:00
Wez Furlong c0649ad4bb remove cfg_attr(feature = "cargo-clippy" noise
I never liked clippy for dropping turds like this throughout the
code. I'm glad it is no longer required, but now rust is warning
about this syntax being redundant.
2024-09-14 06:49:13 -07:00
Wez Furlong ae9cdad228 ssh domains: use default local echo threshol
The implementation of this is a bit gnarly, because we have
an optional value with a default that *is* populated by the
dynamic config stuff, but that isn't part of the derive(Debug)
impl.

closes: https://github.com/wez/wezterm/issues/5547
2024-07-15 07:27:46 -07:00
Wez Furlong d249c4933d sync color schemes 2024-07-15 06:39:26 -07:00
Wez Furlong 209d13bd6b allow some unused fields
I want these for the future, and they are harmless now
2024-07-14 07:50:30 -07:00
Wez Furlong ff4528e783 fix: blob leases could be broken by tmpwatch
Let's put them in an application-specific cache directory
location instead.

refs: #5422
2024-07-14 07:10:17 -07:00
Aleksey Kuznetsov a46bad17d2 config: show/hide close-tab button 2024-07-13 11:32:54 -07:00
Wez Furlong de10834b6d add X11 Qtile to tiling_desktop_environments
closes: https://github.com/wez/wezterm/issues/5415
2024-05-13 12:22:47 -07:00
Wez Furlong 84bb2fdc46 deps: dedup some nix versions 2024-05-13 11:53:27 -07:00
Wez Furlong 1ca5e6cc90 deps: upgrade smol to 2.0 2024-05-13 10:26:29 -07:00
Wez Furlong 14d426fea8 add cargo deny config, update lru 2024-05-13 08:29:36 -07:00