b224aa1b5677fe4145143dfdf38a91a7270922ec
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
Wez's Terminal
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
User facing docs and guide at: https://wezfurlong.org/wezterm/
Screenshot of wezterm on macOS, running vim
Installation
https://wezfurlong.org/wezterm/installation.html
Getting help
This is a spare time project, so please bear with me. There are a couple of channels for support:
- You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
- Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
- There is a Matrix room via Element.io for (potentially!) real time discussions.
The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.
Supporting the Project
If you use and like WezTerm, please consider sponsoring it: your support helps to cover the fees required to maintain the project and to validate the time spent working on it!
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
316 MiB
0 Stars
2 Watchers
0 Forks
Languages
Rust
97.7%
Python
1%
Shell
0.9%
Nix
0.2%
