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

6575 Commits

Author SHA1 Message Date
Wez Furlong
f268964a65
gui: add target triple to debug overlay
This helps to understand the OS in user reports
2023-01-09 15:52:16 -07:00
Wez Furlong
4ec428ff75
config: allow using bright but not bold text when brightening text
In https://github.com/wez/wezterm/issues/2932 the user desired to have
brightened text without the boldness, as they were accustomed to that
behavior in a couple of other terminal emulators.

This commit changes the `bold_brightens_ansi_colors` from a simple
boolean to a tristate that allows for not changing the brightness,
changing the brightness, and changing the brightness while adjusting
the boldness down to normal levels.

boolean values are accepted for backwards compatibility.
2023-01-09 15:19:17 -07:00
Wez Furlong
37055d2fab
expose some mux domain stuff to lua
refs: https://github.com/wez/wezterm/issues/2933
2023-01-09 08:38:05 -07:00
Wez Furlong
d34297cd2c
update base64, work around another batch of breaking API changes
closes: https://github.com/wez/wezterm/pull/2931
2023-01-08 18:49:45 -07:00
Wez Furlong
c9a0537b7b
palette: fix min width
This avoids a jarring situation where the width rubber-bands to fit
a run of narrower text when scrolling down through the list of options.

refs: https://github.com/wez/wezterm/issues/1485
2023-01-08 07:58:23 -07:00
Wez Furlong
0c7aeb90c6
cargo update 2023-01-08 07:46:31 -07:00
Manpreet Singh
67896f67f5 Add Fedora 37 nightly builds 2023-01-02 15:51:14 -08:00
Wez Furlong
7c88674413
ci: another pass at tumbleweed 2022-12-31 23:44:04 -07:00
Wez Furlong
7b6aad6884
ci: make fix tumbleweed build 2022-12-31 22:38:59 -07:00
Wez Furlong
fc481106af
windows: avoid panic when minimizing w/ WebGpu
```
thread 'main' panicked at 'Error in Surface::configure: Both `Surface` width and height must be non-zero. Wait to recreate the `Surface` until the window has non-zero area.', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.14.0\src\backend\direct.rs:274:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

refs: https://github.com/wez/wezterm/issues/2881
2022-12-30 08:52:01 -07:00
Wez Furlong
130990480f
cargo update 2022-12-30 08:50:10 -07:00
Wez Furlong
aefbb6b4a0
deps: update ntapi to 0.4
Avoids:

```
warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 36`
```
2022-12-30 08:37:53 -07:00
Wez Furlong
8b05fdba84
ci: apparently GH_TOKEN is what it really should be 2022-12-27 10:10:49 -07:00
Omochice
f2632c32fe Fix typo 2022-12-27 09:10:36 -08:00
Wez Furlong
040fa07938
Tweak labels in the menubar/command palette
refs: https://github.com/wez/wezterm/issues/1485
2022-12-26 16:56:23 -07:00
Wez Furlong
a31ba8738c
ssh: respect AddressFamily for environments with broken ipv6
We have to manually connect for this to work well across both
underlying libraries. libssh in particular doesn't support it
at all.

refs: https://github.com/wez/wezterm/issues/2893
2022-12-26 16:18:18 -07:00
Wez Furlong
ff2caf4f66
cargo update 2022-12-25 23:30:13 -07:00
Wez Furlong
c39bbbb451
docs: changelog for https://github.com/wez/wezterm/issues/2782
refs: https://github.com/wez/wezterm/pull/2889
2022-12-25 06:03:40 -07:00
Abdirahman Ahmed Osman
e8886752e8
Add the hidden alias -e for the start subcommand. (#2889)
* Add the hidden alias `-e` for the `start` subcommand.

resolves: 2782

* add alias description to help text

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2022-12-24 16:28:59 -07:00
Wez Furlong
378853f5a5
palette: add icons for a number of entries
refs: https://github.com/wez/wezterm/issues/1485
2022-12-24 16:26:06 -07:00
Wez Furlong
b2e694032f
box model: improve max width constraint for more complex elements
Do a better job at constraining elements with multiple children
to the appropriate width
2022-12-24 16:25:48 -07:00
Wez Furlong
b52ccfe36a
palette: adjust group prefix when menubar is empty
Avoid printing `: ` at the start of the line

refs: https://github.com/wez/wezterm/issues/1485
2022-12-24 08:17:24 -07:00
Wez Furlong
b1c3103a08
macos: update menubar when the config reloads
This is moderately painful to do, because of some objc/cocoa lifetime
concern that causes a crash when attempting to simply replace the
entire menubar, so we try to find/update items instead.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-24 00:10:04 -07:00
Wez Furlong
1fad25e926
include key assignments in palette and menubar
Fixup CopyMode key assignments; they were all incorrectly
labelled as activating copy mode, which isn't correct.
We're just using Debug labelling for them at the moment,
need to get that fixed properly.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-23 20:18:26 -07:00
Wez Furlong
85afd9b599
tidy up macos menubar key assignment
This commit safely registers key equivalents with the menubar.  Safe in
this context means "doesn't override a key assignment from a key table".
For example, it would suck to define an application-wide key assignment
for a key combination that has a different assignment in a key table
that may be activated conditionally by some user-defined state/mode.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-23 19:59:35 -07:00
Wez Furlong
1cdf74d19e
menubar: re-categorize attach/detach
refs: https://github.com/wez/wezterm/issues/1485
2022-12-23 14:55:50 -07:00
Wez Furlong
b12506ea30
command palette: tweak for empty doc case
refs: https://github.com/wez/wezterm/issues/1485
2022-12-23 14:55:16 -07:00
Wez Furlong
3a9513e194
improve width constraints in box_model, center command palette
refs: https://github.com/wez/wezterm/issues/1485
2022-12-23 09:03:51 -07:00
Wez Furlong
b789ec447a
synthesize commands from domains, workspaces
Similar to the equivalent functionality in the launcher menu,
syntheisze some default commands based on the current state
of the launcher menu (config) and mux (domains, workspaces).

This does mean that the launcher menu may show duplicates for these
if it has COMMANDS enabled.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-22 20:56:50 -07:00
Wez Furlong
ab8a4f129c
command palette: first pass
This commit introduces a rough first pass at a command palette modal.
It is an adaptation of the emoji character selector and needs
refinement.

Importantly, the default pane selector key assignment now calls
into this new command palette instead.

refs: https://github.com/wez/wezterm/issues/1485
2022-12-22 20:24:57 -07:00
Wez Furlong
295e0c444f
ci: potentially fixup flakey pages build
It has been failing sporadically due to GH API rate limiting.
Use the gh CLI if available, to pick up our access token.
2022-12-22 10:54:17 -07:00
Wez Furlong
6479df63b9
removed deprecated Copy, Paste, PastePrimarySelection actions
These have been deprecated since early 2021; time to remove them
and simplify a little.
2022-12-22 07:31:18 -07:00
Wez Furlong
72da5d161e
docs: changelog for https://github.com/wez/wezterm/issues/2819 2022-12-21 16:34:01 -07:00
Wez Furlong
82da1b42f7
launcher: prefer to use human description of key assignment
refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 13:31:05 -07:00
Wez Furlong
98479d8530
Re-organize default command list
refs: https://github.com/wez/wezterm/issues/1485
2022-12-21 13:26:18 -07:00
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