1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00
Commit Graph

6590 Commits

Author SHA1 Message Date
Wez Furlong
01962235f4
add descriptions for all keyassignment actions
refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 13:08:24 -07:00
Wez Furlong
669fec9a9f
adjust default command list
re-structure it so that we have a list of default action values,
and a function that can compute the command description from them.

This allows describing user-specified actions in the future,
as well as reducing some boilerplate: we can now generate eg:
ActivateTab(n) description text without hardcoding similar
alternatives.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 11:00:45 -07:00
Wez Furlong
37b5dd91a5
move OpenInBrowser -> KeyAssignment
This allows defining those help actions that open URLs in the main
commands list, and not just for the macOS Help menu.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 07:04:51 -07:00
Wez Furlong
4b3660d166
macos: allow running when there are no windows
Most of this commit is refactoring the spawn logic so that we
can reuse most of it to handle spawn requests when there is
no GUI window.
2022-12-21 00:31:58 -07:00
Wez Furlong
f7eb13dd8d
put quit at bottom of application menu 2022-12-21 00:31:58 -07:00
Wez Furlong
787f6550b8
macos: link to helpful resources from Help menu 2022-12-21 00:31:58 -07:00
Wez Furlong
b5aea795ca
fixup tests
refs: https://github.com/wez/wezterm/issues/162
refs: https://github.com/wez/wezterm/issues/1485
2022-12-20 20:48:44 -07:00
Wez Furlong
b224aa1b56
macOS: add MenuBar
This took a decent amount of effort to thread through with context;
wrappers around NSMenu and NSMenuItem are added to reduce some of
the objc usability warts, and an additional NSObject wrapper is
added to help copy the KeyAssignment from the existing list
of command palette commands and associate it with the menu item.

When a menu item is selected, macOS will walk through the responder
chain and look for a responder that responds to the selector associated
with the menu item.  In practice that means that our window/view class
will be tried first, and then later, our app delegate will be tried.

This commit implements routing from both of these: the window case
routes to the associated TermWindow and drops into the existing
perform_key_assignment method.

In case there is no window (not currently possible, but will be
in the future), the app delegate also has a placeholder for dispatching
key assignments, although it will only be able to perform a subset
of the possible actions.

A couple of things to note:

* Items aren't smart enough to disable themselves or adjust their
  caption based on the context. To make that work, we either need
  to recreate the entire menubar when any possible context changes
  (doable, but feels heavy), or we need to assign a target to each
  menu item and implement a validation handler on that target.
  That seemed to mess with the responder chain when I briefly
  experimented with it.

* There's some disabled code to add a Services menu. It is disabled
  because when it is enabled, accessing either Services or Help
  from the menu bar sends the process into a busy loop somewhere
  in macOS's internals.  It's unclear what it is unhappy with.

* No keyboard accelerators are associated with the menubar yet.
  That needs some thought, as they would essentially become global
  keyboard shortcuts and take precedence over the shortcuts defined
  for other keys in the config.  This feels like it should be something
  that the user has control over, so there needs to be something to
  allow that before we go ahead and wire those up.

refs: https://github.com/wez/wezterm/issues/162
refs: https://github.com/wez/wezterm/issues/1485
2022-12-20 19:46:08 -07:00
Wez Furlong
eb8dfd32b3
macos: use interactive shell for .command scripts
This is primarily so that the user's environment is set up prior
to invoking the script.

refs: #2871
2022-12-20 08:30:07 -07:00
Wez Furlong
0da36a40fd
ci: refine error reporting in doc build 2022-12-19 22:11:01 -07:00
Wez Furlong
19b01261cb
mux: avoid deadlock in mux server
Ensure that we don't need a lock to examine the tab_id
2022-12-19 22:06:59 -07:00
Wez Furlong
fe55ace7d9
deps: harfbuzz -> 6.0.0 2022-12-19 17:33:00 -07:00
Wez Furlong
e020a9f6cd
fix windows build 2022-12-19 15:21:13 -07:00
Wez Furlong
30238acb1b
x11: potential fix for hanging IME
refs: https://github.com/H-M-H/xcb-imdkit-rs/issues/5
refs: https://github.com/wez/wezterm/issues/2819
2022-12-19 12:23:04 -07:00
Wez Furlong
02eb0b4294
mux: rename Mux::get() -> try_get(), add "infallible" Mux::get()
This allows removing a bunch of unwrap/expect calls.

However, my primary motive was to replace the cases where we used
Mux::get() == None to indicate that we were not on the main thread.

A separate API has been added to test for that explicitly rather than
implicitly.
2022-12-19 11:55:35 -07:00
Wez Furlong
478cc59be3
mux: Mux is now Send+Sync 2022-12-19 11:54:02 -07:00
Wez Furlong
ee2aac0902
mux: require that Domain be Send + Sync 2022-12-19 11:52:38 -07:00
Wez Furlong
920ee853b3
mux: switch RefCell to RwLock internally
This is a step towards making it Send+Sync.

I'm a little cagey about this in the long term, as there are some mux
operations that may technically require multiple fields to be locked for
their duration: allowing free-threaded access may introduce some subtle
(or not so subtle!) interleaving conditions where the overall mux state
is not yet consistent.

I'm thinking of prune_dead_windows kicking in while the mux is in the
middle of being manipulated.

I did try an initial pass of just moving everything under one lock, but
there is already quite a lot of mixed read/write access to different
aspects of the mux.

We'll see what bubbles up later!
2022-12-19 11:52:38 -07:00
Wez Furlong
696148941c
Rc<Tab> -> Arc<Tab> 2022-12-19 11:52:38 -07:00
Wez Furlong
b58d026542
mux: make Tab Send+Sync 2022-12-19 11:52:38 -07:00
Wez Furlong
9e67ad7861
mux: reduce context switching when parsing output
Now that we use Arc<Pane> we can directly pass the pane to the
background thread that we're using to parse the terminal output, cutting
out some context switching and reducing the latency between output and
rendering that output.
2022-12-19 11:52:37 -07:00
Wez Furlong
aa3d722e1f
mux: add notify_from_any_thread helper 2022-12-19 11:52:37 -07:00
Wez Furlong
6e06b9af02
mux: Pane is now required to be Send+Sync. Use Arc<dyn Pane> 2022-12-19 11:52:33 -07:00
Wez Furlong
758a09f55f
ci: add debug output when building docs
This step is flaking out often in CI and I'd like to get a better sense
of why.
2022-12-19 11:45:29 -07:00
Wez Furlong
fe60155d3d
withdraw DEC private SGR handling for super/subscript
refs: https://github.com/mintty/mintty/issues/1189
refs: https://github.com/mintty/mintty/issues/1171
2022-12-19 11:37:53 -07:00
Wez Furlong
0fa8e9bc86
cargo update 2022-12-19 11:13:02 -07:00
Wez Furlong
28c7c0ba19
macos: allow association with .command file type
Implement an app delegate to receive a callback when the system
requests that we open `.command` files, and then ask the mux
layer to spawn a window for it and execute it via the shell.

Also allow handling `.sh`, `.zsh`, `.bash`, `.fish` and `.tool`,
per kitty.

refs: https://github.com/wez/wezterm/issues/2741
refs: https://github.com/wez/wezterm/issues/2871
2022-12-19 11:06:12 -07:00
Wez Furlong
e70f97903b
disable window title reporting escape sequence by default 2022-12-18 10:37:21 -07:00
Wez Furlong
f22eec7970
docs: add aarch64 macos example to target_triple 2022-12-17 21:59:49 -07:00
Wez Furlong
91ea1095c9
deps: update base64
closes: https://github.com/wez/wezterm/pull/2855
2022-12-12 09:15:09 -07:00
Wez Furlong
8a527fe7bc
cargo update 2022-12-12 09:02:19 -07:00
Val Packett
9fb7f8fe49 add .mailmap 2022-12-07 12:09:06 -08:00
Val Packett
896256e420 docs: changelog: chase username change 2022-12-07 12:09:06 -08:00
Wez Furlong
92e851d648
docs: expand font_rules
refs: #2836
2022-12-06 09:36:35 -07:00
Wez Furlong
af9d0efa17
cargo update 2022-12-04 19:40:53 -07:00
cgrigis
fcace3d5e3
Remove Source entry in Debian control file (#2828)
Remove `Source` entry in final Debian control file
2022-12-04 08:53:37 -07:00
Russell Cloran
8d8d7d3ff4 Fix shell-resolution documentation in launch 2022-11-30 11:13:38 -08:00
dependabot[bot]
c6e29b78b7 build(deps): bump rstest from 0.15.0 to 0.16.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-27 21:52:32 -08:00
Wez Furlong
9923ae20b5
env_logger -> 0.10
closes: https://github.com/wez/wezterm/pull/2803
2022-11-27 21:37:25 -07:00
Wez Furlong
9d109337e7
cargo update 2022-11-27 21:32:51 -07:00
Wez Furlong
68c754b1f3
fonts: improve error message slightly
refs: https://github.com/wez/wezterm/issues/2772
2022-11-22 15:46:21 -07:00
Wez Furlong
4b8515e69f
cleanup: a few references to the Last Resort font
It was removed in the latest release, so these no longer apply
2022-11-22 15:40:17 -07:00
Wez Furlong
8a478e29a4
docs: https://github.com/wez/wezterm/pull/2662 2022-11-22 08:37:03 -07:00
Peter Nguyen
b26da03085 wezterm-gui: implement move_by_page function 2022-11-22 07:35:09 -08:00
Peter Nguyen
81d6c88af0 docs: add documentation for new default key bindings 2022-11-22 07:35:09 -08:00
Peter Nguyen
9fa44574a8 wezterm-gui: support half page up/down navigation 2022-11-22 07:35:09 -08:00
Wez Furlong
877d364bff
docs: mention new background option from window_background_image
refs: https://github.com/wez/wezterm/issues/2757
2022-11-21 18:12:44 -07:00
Wez Furlong
51e45a475d
cargo update 2022-11-20 22:18:37 -07:00
Orhun Parmaksız
0bf36e5ada refactor: replace the deprecated usage of chrono::TimeZone::ymd
Since `chrono` 0.4.23, `chrono::TimeZone::ymd` is deprecated
in favor of `with_ymd_and_hms()`. This commit removes the deprecated
usage and switches to the new `chrono` library API.

Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-11-20 09:39:10 -08:00
Wez Furlong
173862634e
docs: released 20221119-145034-49b9839f 2022-11-20 06:53:49 -07:00