1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00
Commit Graph

6926 Commits

Author SHA1 Message Date
Jalil David Salamé Messina
c2f63c296b fix: Formatting 2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
9f6595d76e chore: Update Cargo.lock 2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
fc5e8b4f3d fix: Update signal-hook to 0.3 and fix compilation errors
- Some functions are now under the `low_level` module, use that
2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
344f133608 chore: Update criterion to 0.4 2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
05df6ec054 chore: Update nix to 0.26 2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
7f89f46ae5 fix: Update bitflags to 2.0 and fix compilation errors
- v2.0 no longer derives a bunch of traits (Debug, Clone, Copy, PartialEq, Eq)
  by default, so I manually derived them.
- It also changed the snapshot results so I updated them:

  An empty bitflags struct is no longer displayed as `None` but as
  `BitFlags(0x0)`.

- `bits` is no longer a field but a method so I added the missing
  parenthesis.
2023-03-27 07:38:55 -07:00
Jalil David Salamé Messina
7721126fdd chore: Update phf to 0.11 2023-03-27 07:38:55 -07:00
Wez Furlong
5b51179265
deps: update sha2
closes: https://github.com/wez/wezterm/pull/3379
2023-03-26 19:50:53 -07:00
Wez Furlong
6ee68b2b17
cargo update 2023-03-26 19:49:36 -07:00
Wez Furlong
204049b83e
ci: update cargo-install
closes: https://github.com/wez/wezterm/pull/3377
2023-03-26 19:47:48 -07:00
Wez Furlong
f8c60dcddc
docs: update for latest release 2023-03-26 19:45:32 -07:00
Wez Furlong
3666303c7b
docs: show the return values of the new pane:move_to_xxx methods 2023-03-26 11:19:34 -07:00
Wez Furlong
e56b169cc4
mux: add lua api equivalent to move-pane-to-new-tab
refs: #3374
2023-03-26 11:08:43 -07:00
Wez Furlong
d9d6b2a01a
mux: forward move-pane-to-new-tab requests to hosting mux
refs: #3374
2023-03-26 10:41:01 -07:00
Wez Furlong
b99ecead8b
ci: automate making PR for flathub at release time 2023-03-26 06:42:04 -07:00
Nelson Benitez Leon
24ec8a0382 hyperlink_rules.md: add link supported regex syntax
Add a link to regex syntax supported in wezterm, so eg. we have a way to know that perl character class '\c' is not supported and instead we can use the ascii equivalent [:cntrl:]
2023-03-25 22:08:04 -07:00
Wez Furlong
98e137942a
mux: move-pane-to-new-tab didn't resync structure
Resolution is to propagate the MuxNotification to the clients
and have them resync.

refs: https://github.com/wez/wezterm/issues/3219
2023-03-25 20:50:03 -07:00
Wez Furlong
59503034c7
tidy up some debug logging 2023-03-25 20:33:23 -07:00
Wez Furlong
8dd365d4c5
mux: fix some dpi and pixel size issues
Three issues:

* The initial connect would leave the dpi assigned to 0, resulting
  in incorrect scaling when using imgcat until the window was resized
  and the correct dpi was passed up.
* On resize, we'd only compare the row/col count and not notice changes
  in pixel dimensions/dpi
* On the server side, when processing a resize and recomputing
  the tab size, we would omit the pixel dimensions and leave
  the resulting tabs and panes with 0 dimensions, breaking imgcat
  because it thought the window was 0x0.

refs: https://github.com/wez/wezterm/issues/3366
2023-03-25 20:24:57 -07:00
Wez Furlong
727cd95dcd
images: improve logging when things are weird
refs: https://github.com/wez/wezterm/issues/3366
2023-03-25 18:55:26 -07:00
Wez Furlong
d491c736ef
When a modal is active, it gets first dibs on key processing
This fixes a surprising interaction between copy mode and the
command palette, but is also the root cause of another issue
with CharSelect mode.

refs: https://github.com/wez/wezterm/issues/2947
2023-03-25 18:32:38 -07:00
Wez Furlong
500934bc9c
palette: exclude copy mode actions unless copy mode is active 2023-03-25 18:10:00 -07:00
Wez Furlong
1c55ca14b0
macos: invalidate window when dispatching from menubar
refs: https://github.com/wez/wezterm/issues/3365
2023-03-25 13:47:54 -07:00
Wez Furlong
c3b265b8c4
fmt 2023-03-25 13:30:15 -07:00
Wez Furlong
133faf8305
Add new-tab-button-click event
refs: #323
refs: https://github.com/wez/wezterm/discussions/3364
2023-03-25 13:26:16 -07:00
Wez Furlong
2a2b075d71
cargo update 2023-03-25 11:36:01 -07:00
Wez Furlong
ca283c1310
palette: prioritize platform-appropriate shortcuts
On macOS prefer CMD, but on other platform prioritize shortcuts
that don't use CMD, as those tend to reserve the CMD based shortcuts
for the system.

Allow specifying how many shortcuts to show if an action has
multiple assignments.  The default is 1.

refs: https://github.com/wez/wezterm/issues/3335
2023-03-25 11:14:54 -07:00
Wez Furlong
c7e4c7fcd0
palette: refactor slightly
Avoids emitting blank padding for rows that have no key assignments
2023-03-25 10:47:50 -07:00
Wez Furlong
c5213b4f85
palette: add config for how ui key caps render
added a new `ui_key_cap_rendering` option that accepts the following
values:

```lua
-- Super, Meta, Ctrl, Shift
config.ui_key_cap_rendering = 'UnixLong'

-- Super, M, C, S
config.ui_key_cap_rendering = 'Emacs'

-- Apple macOS style symbols
config.ui_key_cap_rendering = 'AppleSymbols'

-- Win, Alt, Ctrl, Shift
config.ui_key_cap_rendering = 'WindowsLong'

-- Like WindowsLong, but using a logo for the Win key
config.ui_key_cap_rendering = 'WindowsSymbols'
```

refs: https://github.com/wez/wezterm/issues/3335
2023-03-25 09:18:52 -07:00
Wez Furlong
1531dd8471
update tests for updated JetBrainsMono 2023-03-25 07:21:36 -07:00
Wez Furlong
843b9e8fc4
update bundled JetBrainsMono to 2.304 2023-03-25 07:18:29 -07:00
Wez Furlong
d60cdbf74e
palette: show key assignment alongside entries
For items in the main set of key assignments, show the keyboard
shortcut to the right.

Some items have multiple key assignments; we show only the first
one. We'll probably want to be a bit smarter. For instance,
both linux and windows tend to occupy the Windows/Super key
assignments, so we should probably prioritize showing the Ctrl+Shift
variants on those platforms.

refs: https://github.com/wez/wezterm/issues/3335
2023-03-24 23:34:49 -07:00
Jalil Salamé
64b8749eb3
ci: Use nextest (#3342)
* ci: Use cargo-nextest to improve testing times

* chore: Regenerate workflows

* chore: Use nextest in non generated workflows

* fix(nextest): No fail fast

* fix: Caching of nextest ignores conatiner

* chore: Regenerate workflows

* fix(ci): Wrong input to cargo-install action

* fix: Merge conflicts

* fix(flaky-tests): Try updating OpenSUSE Leap to 15.4
2023-03-24 21:11:22 -07:00
Wez Furlong
499e5f73d0
palette: show the label from the command in the palette
Given an assignment like this:

```
{
  key = "b",
  mods = "ALT",
  action = wezterm.action.SplitPane {
    direction = 'Right',
    command = {
      label = 'Bash Right',
      args = {'/usr/bin/bash' }
    }
  }
}
```

we should show the label from the command in the palette.
That's what this commit enables.

If there is no label, but the arguments are set, then the
arguments will be shown instead.

refs: #3252
2023-03-24 21:05:14 -07:00
Wez Furlong
b113cc909e
docs: changelog for https://github.com/wez/wezterm/pull/3344 2023-03-24 19:23:47 -07:00
Gkirito
63676c30d2
refactor(config & macos/windows): rename window_background_blur to macos_window_background_blur 2023-03-24 19:04:15 -07:00
Gkirito
1b24ff1abf
feat(config & window): use CGSSetWindowBackgroundBlurRadius to set background blur on macos 2023-03-24 19:04:15 -07:00
Wez Furlong
a903796d61
docs: clarify the default for allow_square_glyphs_to_overflow_width 2023-03-24 18:45:45 -07:00
Wez Furlong
3ee0335a40
more entitlements on macos
refs: https://github.com/wez/wezterm/issues/3359
2023-03-24 18:33:02 -07:00
Wez Furlong
27fce9eb8c
re-run black ci/generate-workflows.py 2023-03-24 17:55:19 -07:00
Jalil Salamé
66b29c88e0
ci: Use rust-cache instead of the general cache action (#3341)
* feat: Cache Rust artifacts using Swatinem/rust-cache@v2

* chore: Generate workflows

* chore: Modify non generated workflows

* fix: Add caching to workflows that were missing it

* fix: Merge conflicts

* fix(ci): No need to hash files ourselves

* chore: Regenerate workflows

* fix: Only cache workspace (other changes don't invalidate cache)

---------

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2023-03-24 17:54:36 -07:00
Jalil David Salamé Messina
51e87e8df5 fix(ci): Use install action instead of manually calling cargo-install 2023-03-24 17:50:30 -07:00
Wez Furlong
2c6ec574c2
fixup for running the tests
There is no mux when running the tab tests, so allow for that
to fail when we're trying to dispatch notifications.
2023-03-24 17:33:07 -07:00
Wez Furlong
604ef152be
add wezterm cli activate-pane, wezterm cli activate-tab
refs: #3352
refs: https://github.com/wez/wezterm/issues/886
2023-03-24 17:32:55 -07:00
Wez Furlong
f44d02504c
Add: wezterm cli kill-pane
refs: #3352
2023-03-24 17:31:34 -07:00
Wez Furlong
622ea1add8
mux: notify clients when the size/structure of a tab changes
This helps to notify when eg: splits are changed, or the tab
is resized by another client.

refs: https://github.com/wez/wezterm/issues/2133
refs: https://github.com/wez/wezterm/issues/2351
refs: https://github.com/wez/wezterm/issues/783
2023-03-24 17:28:34 -07:00
Wez Furlong
f71bce1727
mux: propagate pane focus change events to clients
This commit causes the mux to generate a PaneFocused notification
when the active pane is changed.

The mux server will forward that as a unilateral PDU to connected
clients.

The clientpane implementation will handle that by applying the
same state to the local mux.

refs: #2863
2023-03-24 13:13:31 -07:00
Wez Furlong
75cdb2190d
reformat generate-workflows.py with black 2023-03-24 10:16:47 -07:00
Jalil Salamé
1535d88290
Ci toolchain: Do not use actions-rs/toolchain (#3327)
* fix(generate-workflows): Do not use actions-rs

[actions-rs/toolchain](https://github.com/actions-rs/toolchain) is unsupported:

- Has not recieved updates since November 2020 (~2.5 years)
- It uses Node.js 12 and GitHub will stop supporting it Summer this year(?) see
  this [article](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/).

[dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) is
actively supported and its mostly a 1-1 replacement, the differences are:

- Uses the minimal profile always, so no need to specify it.
- There is no need to override the toolchain.

I also removed some things:

- None of the generated actions use `rustfmt` so I removed the component
- The toolchain is always stable, so I specified it in the action itself
  instead of in the action parameters.

* ci: Regenerate workflows

* fix: Remove ALLOW_UNSECURE_COMMANDS from action

* fix(CentOS7): Manually install rustup as CentOS7 uses a very old curl

* fix: Restart shell so that the rustup command is available

* feat: Add exeption to the CentOS workflow to download rustup

* fix: Remove actions-rs/toolchain from remaining workflows

* fix: Address review comment
2023-03-24 10:16:09 -07:00
Wez Furlong
2e488d57c7
update terminfo to 0.8 2023-03-24 10:12:49 -07:00