Commit Graph
8530 Commits
Author SHA1 Message Date
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
Kenneth Jefferson 6a493f88fa docs: Fix typo in augment-command-palette.md
Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
2025-07-30 19:57:51 +01:00
Kenneth Jefferson ac11fcfa41 fix: Corrected bad title in MoveForwardWordEnd.md
Signed-off-by: Guennadi Maximov C <g.maxc.fox@protonmail.com>
2025-07-30 19:57:51 +01:00
Chris Pick dd6e5bd2f4 Unset $RUST_BACKTRACE in nixShell
Prevent printing two backtraces.

env-bootstrap/src/lib.rs's `register_panic_hook()` already prints a
backtrace unconditionally, setting `RUST_BACKTRACE=1` causes a duplicate
to be printed.
2025-07-25 07:39:38 +01:00
Wez Furlong d1bdb8a350 ci: debian 10.3 (buster) is no longer available, remove it 2025-07-23 08:21:40 +01:00
Wez Furlong 411590aa1f docs: changelog for #7098 2025-07-23 08:17:29 +01:00
Chris Pick efec7001a3 Re-enable macOS' "Services" menu
Now that validating service menu items doesn't loop forever, it can be
re-enabled.

It still won't have all possible services listed until/unless validation
is implemented more thoroughly, but some are already present.
2025-07-23 08:15:24 +01:00
Chris Pick cfb1e9190f Prevent infinite loop in macOS' "Service" menu validation
The `WezTermAppDelegate` class was setting `NSWindow` as its parent.

This caused an infinite loop any time macOS's "Service" menu was
expanded becuase it would pass [`validRequestorForSendType:returnType:`]
(https://developer.apple.com/documentation/appkit/nsresponder/1524638-validrequestor)
messages along the full responder chain to [check for objects that are
eligible for services offered by other applications]
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-148895).

The [responder chain]
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html#//apple_ref/doc/uid/10000060i-CH3-SW9)
would walk up to the `WezTermAppDelegate` which, since it was an
`NSWindow`, would walk back to `NSApp` which would walk to its delegate
(`WezTermAppDelegate`) and so on forever.


Change `WezTermAppDelegate`s parent class `NSObject` to prevent this
loop.

Fixes: https://github.com/wezterm/wezterm/issues/6738
Fixes: https://github.com/wezterm/wezterm/issues/6833
2025-07-23 08:15:24 +01:00
Chris Pick 85c587f9f3 Remove deprecated NSWindowFullScreenButton
Fixes #7080 to prevent null pointer dereference (and crash in debug
mode) on macOS.

`NSWindowFullScreenButton`
[is deprecated](https://developer.apple.com/documentation/appkit/nswindow/buttontype/fullscreenbutton?changes=__6_5&language=objc).
Removing it prevents a null pointer from being dereferenced and doesn't
otherwise impact behavior.

Confirmed that `window_decorations = "RESIZE"` sill works
[with rounded corners](https://github.com/wezterm/wezterm/issues/1034).
2025-07-13 13:51:09 +01:00
github-actions[bot] c7f4b081a6 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3?narHash=sha256-N4cp0asTsJCnRMFZ/k19V9akkxb7J/opG%2BK%2BjU57JGc%3D' (2025-05-16)
  → 'github:NixOS/nixpkgs/b95255df2360a45ddbb03817a68869d5cb01bf96?narHash=sha256-IJWIzZSkBsDzS7iS/iwSwur%2BxFkWqeLYC4kdf8ObtOM%3D' (2025-06-30)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/f44db7d7cea4528288780c6347756173a8248225?narHash=sha256-veyXchTz6eWwvuW5X49UluHkheHkFcqHJSwGuKBhrmQ%3D' (2025-05-17)
  → 'github:oxalica/rust-overlay/b22d5ee8c60ed1291521f2dde48784edd6bf695b?narHash=sha256-y%2BviCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0%3D' (2025-06-30)
2025-07-03 07:09:41 +01:00
Wez Furlong 54675c9c35 window: fix use of deprecated objc2_core_graphics::CGColorCreateSRGB 2025-07-01 07:47:23 +01:00
Wez Furlong 9dbd5e16fa macos: pin legacy objc deps to version before mass deprecation
These crates are all deprecated in favor of the new objc2 crate,
but the migration to objc2 is non-trivial.  Meanwhile, the volume
of deprecation warnings is overwhelming and getting in the way.

Pin these deps back to a versions prior to the mass deprecation
so that we're not drowning in spew in the meantime.
2025-07-01 07:47:09 +01:00
Wez Furlong d3d9d8e396 env-bootstrap: migrate to objc2 2025-06-30 07:45:15 +01:00
Wez Furlong c4acbbc823 cargo update 2025-06-30 07:31:38 +01:00
Wez Furlong b249d9c427 deps: wgpu 24 -> 25 2025-06-30 07:28:05 +01:00
Wez Furlong d765b89594 gui-subcommands: remove unused anyhow dep 2025-06-30 06:52:24 +01:00
Rain 2deb317ec0 improve pct_to_glyph algorithm for progress reporting
The current `pct_to_glyph` algorithm would unintentionally produce `\u{f0aa6}`
for percentages in the range 96..=100.

Use a different algorithm that:

* uses an empty circle for the first 5%
* uses a filled circle for the last 5%
* has a roughly even distribution for the rest of the range
2025-06-24 07:12:46 +01:00
Wez Furlong 2b656cb5b9 docs: changelog for #7046 2025-06-22 06:47:17 +01:00
James Holderness 58141ad6f2 term: indicate support for OSC 52 in Primary DA response
This is an extension agreed upon by modern terminals to indicate that
they support copying to the clipboard with XTerm's OSC 52 sequence.

https://github.com/contour-terminal/vt-extensions/blob/master/clipboard-extension.md
2025-06-22 06:44:36 +01:00
Phineas Jensen d6c178f961 Fix disable ligatures snippet 2025-06-15 12:14:31 -07:00
Wez Furlong 5106c8c1f7 docs: add since-nightly to kde_window_background_blur
refs: https://github.com/wezterm/wezterm/pull/6905
2025-06-04 06:01:57 -07:00
Wez Furlong 53da5d463b docs: fmt 2025-06-04 06:01:45 -07:00
Benoit de Chezelles 649931178e Rename flake update workflow to be with other nix-related workflows 2025-06-04 05:59:28 -07:00
Benoit de Chezelles 518be59b9d Don't update th flake dependencies _that_ ofthen 2025-06-04 05:59:28 -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
Wez Furlong f150ade689 wezterm-ssh: fixup test for varying local hostname in CI 2025-05-24 07:46:29 -07:00
Wez Furlong aef3827cd7 wezterm-ssh: fixup standalone build 2025-05-24 07:38:57 -07:00
Wez Furlong 662e9b0c7b wezterm-ssh: expand a couple more ssh_config tokens
A couple of these are for things that we don't support; the intent
is not to support the associated features so much as avoid emitting
warnings when loading an ssh config that references them, especially if
the offending section of the config isn't actually being used by
wezterm.

refs: https://github.com/wezterm/wezterm/issues/6975
2025-05-24 07:25:44 -07:00
Wez Furlong 4d11d46eab cargo update 2025-05-24 06:08:23 -07:00
github-actions[bot] 5663e74994 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b3582c75c7f21ce0b429898980eddbbf05c68e55?narHash=sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0%3D' (2025-05-07)
  → 'github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3?narHash=sha256-N4cp0asTsJCnRMFZ/k19V9akkxb7J/opG%2BK%2BjU57JGc%3D' (2025-05-16)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/c46d2764319f962b20ce9c03ce6644dd0de87bc9?narHash=sha256-cXn1RsYZjS23n0%2BYP3TiH7XBlEvy8FA2mG54MdAL6x0%3D' (2025-05-11)
  → 'github:oxalica/rust-overlay/f44db7d7cea4528288780c6347756173a8248225?narHash=sha256-veyXchTz6eWwvuW5X49UluHkheHkFcqHJSwGuKBhrmQ%3D' (2025-05-17)
2025-05-18 06:02:18 -07:00
Wez Furlong 2bfa34fca5 Revert "cargo update"
This reverts commit 0fb80ca503.

The `windows-result` crate fails to build vendored in CI
2025-05-17 10:17:49 -07:00
Wez Furlong f54dd1b028 macos: don't try swrast fallback for mesa
We're not using; we only use either Metal via WebGpu (and thus
don't ever get into the egl code), or Egl via the native opengl
implementation.

So we can bail out of the loop with the swrast fallback like
we do on windows.

closes: https://github.com/wezterm/wezterm/issues/6819
2025-05-17 09:36:33 -07:00
Wez Furlong 8e35f94d7c wezterm-ssh: fix leaking ssh-agent children in tests
This has been bothering me for a long time; ensure that we kill
the ssh-agent processes spawned by the tests.
2025-05-17 09:21:11 -07:00
Wez Furlong ab6a92df74 deps: deal with deprecation in tempfile crate 2025-05-17 09:21:11 -07:00
Wez Furlong 0fb80ca503 cargo update 2025-05-17 09:21:10 -07:00
Benoit de Chezelles e8785f5fe3 nix: Update harfbuzz
refs: f412c817c
2025-05-17 09:08:20 -07:00
Wez Furlong f412c817c6 update harfbuzz to 11.2.1 2025-05-17 06:44:31 -07:00
Wez Furlong ce58db64da docs: add faq entry on how to disable ligatures
closes: https://github.com/wezterm/wezterm/issues/6413
2025-05-17 06:38:52 -07:00
Joe Xue 8fb60ad82b fix: tmux -CC mode not parsing output correctly
refs: #6769
closes: #6779

The tmux output may split into multiple parts, if this spliting happens
in the middle of multiple bytes UTF8 characters, then the issue raised.
That the first part will have incomplete UTF8 character while the second
part will have a invalid UTF8 character.

In this case, we have to treat the output text as bytes rather than
UTF8 string.

This fix unvis the output text and send to pane as bytes.
2025-05-17 06:06:17 -07:00
Wez Furlong 909573fad9 ssh: implement ServerAliveInterval for libssh backend
This is a partial implementation of keepalives; it has the good
part (the sending of the packet on the requested interval), but
not the other part (disconnecting if we don't hear anything after
some number of packets).

The reason for not having the latter is that it isn't obvious to me how
to expose whether the channel had more incoming packets since sending
the ignore, so we cannot confidently act to terminate the connection.

refs: https://github.com/wezterm/wezterm/issues/4023
2025-05-14 07:14:22 -07:00
Benoit de Chezelles bb3c8e2200 Fix Nix build by disabling broken cargo-auditable step 2025-05-13 19:26:51 -07:00
Wez Furlong 475e9f571f docs: changelog for #6895 2025-05-11 22:23:09 -07:00
ad44b159c2 feat(mark-last-tab): append last tab name with '*' (#6895)
* feat(mark-last-tab): append last tab name with '*'

I think there should be a better method instead of make the save function so crowded.
But this works for now similar to `tmux` windows. But, `tmux` is using '*' for current and '-' for last
Hardcoded '*'

* Revert "feat(mark-last-tab): append last tab name with '*'"

This reverts commit 6f11c16dd9b034977088820fbc86a4456df9d513.

* feat(tab): add is_last to indicate previous active tab - last tab.

Add usage example to format-tab-title.md
Add docs to TabInformation.md

Couldn't add tests, perhapse can you guide on adding test for this?

* Update docs/config/lua/TabInformation.md

renaming as suggested.

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

* Update wezterm-gui/src/termwindow/mod.rs

renaming as suggested.

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

* Update docs/config/lua/window-events/format-tab-title.md

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

* refactor: rename `TabInformation` attribute to `is_last_active`

---------

Co-authored-by: Omar Elmasri <omarmasri@duck.com>
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-05-11 22:20:21 -07:00
Wez Furlong a841a72cf2 docs: changelog for #6796 2025-05-11 10:01:17 -07:00
mgpinf 9b2350f292 docs: add Launcher label bg, fg to Colors & Appearance 2025-05-11 09:59:01 -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 573bc4ac06 docs: changelog for #6801 2025-05-11 09:56:35 -07:00
mgpinf 65dbbe87e8 docs: update description for hold option
Update description for hold option in cmd-synopsis-wezterm-imgcat--help.txt
2025-05-11 09:54:57 -07:00
mgpinf 659f9900d2 chore: update shell completion descriptions for imgcat --hold option
Update shell completion descriptions for imgcat --hold option for below
shells:
* zsh
* fish
2025-05-11 09:54:57 -07:00
mgpinf cfd91c022e feat: add additional key modifier combinations to exit polling input
Add below key modifier combinations to exit polling input when hold
option is set:
* Ctrl-C
* Ctrl-D
* Escape
2025-05-11 09:54:57 -07:00