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

381 Commits

Author SHA1 Message Date
Wez Furlong
8f31aed3f1 move tmux-cc crate to be module inside termwiz
refs: #1090
2022-01-17 13:43:35 -07:00
g4c
8e04f49d03 split out tmux commands 2022-01-17 13:07:36 -07:00
Wez Furlong
6c19e5af5f cargo update 2022-01-16 18:46:30 -07:00
Wez Furlong
626a022dd5 mux: function to list workspaces and generate a new name
refs: #1531
2022-01-15 08:46:21 -07:00
Wez Furlong
170bb31f4f refactor: move more spawn logic into new mux methods 2022-01-14 22:28:35 -07:00
Wez Furlong
31c754f6e4 refactor: move split_pane logic from mux server to mux 2022-01-14 22:28:35 -07:00
Howard Huang
e01f9c0e7d FEATURE: Allow ScrollByPage f64 values
`ScrollByPage` can accept non-integer values in the configuration.
This allows fractional page scrolling, such as by half a page.

The default remains the same, at 1 page.
2022-01-12 17:01:38 -08:00
Wez Furlong
9b9bd0ae8c mux: track list of clients
Define a way to compute a client ID and pass that through to the
mux server when verifying version compatibility.

Once associated, the session handler will keep some metadata
updated in the mux.

A new cli subcommand exposes the info:

```
; ./target/debug/wezterm cli list-clients
USER HOST              PID CONNECTED  IDLE      WORKSPACE
wez  mba.localdomain 52979 30.009225s 1.009225s
```

refs: #1531
2022-01-11 22:43:26 -07:00
Wez Furlong
2f5f39b1dd cargo update, including updating zbus to 2.0.0 stable 2022-01-09 19:29:29 -07:00
Wez Furlong
79f7f63064 deps: ordered-float -> 2.10
closes: https://github.com/wez/wezterm/pull/1524
2022-01-09 19:25:48 -07:00
Wez Furlong
e8995c5370 wezterm-gui start now prefers to run via existing gui instance
Using the new publish/discovery stuff from the past couple of commits,
if we can find a matching socket path for a running gui, and the
configuration is likely a match, then use the mux protocol to talk
to the already running gui and ask it to spawn the equivalent program
into the same process.

refs: https://github.com/wez/wezterm/discussions/1486
2022-01-07 17:12:35 -07:00
Wez Furlong
91fc705e26 gui/client: add stubs for publishing a main gui instance sock path
This will help to route things through a main gui instance per desktop
session/class.

Currently has stubs for windows.
2022-01-06 20:07:46 -07:00
Wez Furlong
142f3c7d81 launcher now has fuzzy matching
Just start typing text to build up the fuzzy matching term.
The list of items updates to match the results.

refs: #664
refs: #1485
2022-01-04 08:45:15 -07:00
Wez Furlong
7988e65526 cargo update 2022-01-02 19:48:38 -07:00
Wez Furlong
30a390053a window: track phys_code on X11/Wayland
We don't do anything useful with it yet

refs: https://github.com/wez/wezterm/issues/1483
2022-01-02 00:47:04 -07:00
Wez Furlong
b15907f61f input-types: introduce PhysKeyCode type
Based on the mac constants of the equivalent functionality;
may need some tweaking for other OS's.

refs: https://github.com/wez/wezterm/issues/1483
2022-01-01 21:35:37 -07:00
Wez Furlong
910b111efa move procinfo bits into own crate 2021-12-31 19:31:21 -07:00
Wez Furlong
2aa491af1a mux: remove dep on sysinfo; we now do our own win32 stuff
This also removes the sysinfo cache; will replace it with
something else in a follow up commit.
2021-12-31 19:21:45 -07:00
Wez Furlong
96dd41c5c5 window: update smithay-client deps 2021-12-28 07:28:07 -07:00
Wez Furlong
ae9a47e8a6 fix unix build for zbus updates 2021-12-27 10:33:41 -07:00
Wez Furlong
7e90a7008c deps: update pulldown_cmark, cargo update 2021-12-27 09:49:22 -07:00
Wez Furlong
a0cbea2703 term: ignore first OSC title change sequence on Windows
ConPTY emits a sequence that sets the title to the name of the
program that is initially launched into it.

This commit tries to ignore that sequence in that circumstance,
so that the logic in b5d156c282
can more dynamically set the tab title.
2021-12-25 01:10:37 -07:00
Wez Furlong
1d064e0913 Add get_foreground_process_name, expose it and cwd in PaneInformation
Add `get_foreground_process_name` to both Pane and the lua wrapper.

Add `foreground_process_name` and `current_working_dir` fields to
`PaneInformation`.  In order for those to be dynamically fetched,
switch the lua conversion for `PaneInformation` to be a UserData
with field access methods.  It's a little more verbose but allows
us to lazily compute these two new fields.

refs: https://github.com/wez/wezterm/discussions/1421
refs: https://github.com/wez/wezterm/issues/915
refs: https://github.com/wez/wezterm/issues/876
2021-12-23 18:49:17 -07:00
Wez Furlong
668d41ad5d quickselect: add QuickSelectArgs and helpers for opening urls
This commit expands quick select mode so that you can trigger it
with distinct sets of patterns (eg: urls on one key assignment,
hashes on a different key assignment), different alphabets,
and lastly, the option to perform a different action from
the default copy action.

You can pair this with `action_callback` to run lua code to
do something with the selected text.

This commit also adds `wezterm.open_with`, a helper function
for opening documents/URLs.

refs: #846
refs: #1362
2021-12-23 10:55:44 -07:00
Wez Furlong
872935f656 termwiz: publish 0.15 2021-12-22 13:02:31 -07:00
Wez Furlong
5c222cfcdc term: allow iterm2 file transfer protocol
Adds some plumbing to allow the GUI to implement a download handler
and connect that up for iterm2 image/file transfers that have their
inline property set to false.

Previously we'd just log an error.

Now we will by default download the file to the user's download
directory.

This behavior can be turned off via the new `allow_download_protocols`
configuration setting.

File transfers can be initiated on a remote host via the
https://iterm2.com/utilities/it2dl script.

When the download completes, a toast notification is shown that will
open the file when clicked.

refs: https://github.com/wez/wezterm/discussions/1450
2021-12-22 09:21:39 -07:00
Wez Furlong
b40f65c25e termwiz: s/Fuschia/Fuchsia/g
closes: #1407
2021-12-21 20:38:59 -07:00
Wez Furlong
37c83b8308 deps: update 2021-12-20 08:15:56 -07:00
Wez Furlong
ea46967e2d mux: understand process tree, add mux-is-process-stateful event
This commit adds plumbing to support mapping the process tree to
lua objects which in turn allows a new `mux-is-process-stateful`
event to be defined by the user for finer control over closing
prompt behavior.

refs: #1412
2021-12-18 09:46:00 -07:00
Wez Furlong
2412e663f8 gui: add missing dep for windows
refs: #1402
2021-12-17 21:28:41 -07:00
Wez Furlong
de13e17723 ssh: explicitly allow ssh-rsa keys in tests
It looks like the debian 9 test failures with libssh are the
same underlying issue as https://github.com/wez/wezterm/issues/1262

Poking around in the debug output, and then spelunking through the code,
we can use the `pubkeyacceptedtypes` ssh config option to add the key
type to the list of keys.  This doesn't appear to be a documented
option in the current versions of openssh.

I'm not 100% sure that this is right, but it's worth a shot.
2021-12-15 22:05:24 -07:00
Wez Furlong
ef383d8dfa cargo update for libssh windows build updates 2021-12-15 17:59:08 -07:00
Wez Furlong
f398f333cd ssh: make -v option work on Windows, adjust config overlaying
Route logging via the `log` crate because on Windows there is
no stderr visible to libssh.

libssh will override any explicitly set options when it parses
the config file, so we need to apply those after we've loaded it.
2021-12-15 09:18:00 -07:00
Wez Furlong
36a16cb70d fix windows build
A recent cargo update caused openssl-sys to do a minor semver update
from 0.9.71 -> 0.9.72, but that release downgraded from openssl 3
to openssl 1 to resolve a performance regression:
<https://github.com/sfackler/rust-openssl/pull/1578>

That in turn caused libssh to fail to build because the ENGINE
feature required by libssh isn't compiled in in openssl-src 1
crate when vendoring on windows.

For now, my libssh git repo is constrained to openssl-sys 0.9.71,
and we're pointing to that from the wezterm repo.
2021-12-13 09:02:24 -07:00
Wez Furlong
137bdacd3f cargo update
and bump rstest to make dependabot happier
2021-12-12 20:21:55 -07:00
Wez Furlong
7926c31209 pty: introduce ChildKiller trait
In the mux layer, we have some code that takes a `Child` and then
does a bit of naughty reaching through the abstraction to get at
the pid/handle of the child so that we can send it signals even
if the child is itself mutably (and thus exclusively) borrowed
for the purposes of waiting.

That worked fine for local processes spawned in the mux, but we also
use LocalPane to wrap around arbitrary `Child`ren, such as Ssh,
that are not local and that don't have a local process id, which
meant that this hack wouldn't work for them.

To make things a bit worse, those ssh ptys were used to ssh2 days
where we didn't have a way to signal the remote process and just
did nothing, leading to confusing situations such as
https://github.com/wez/wezterm/issues/1197

This commit graduates the hack mentioned in the first paragraph
to its own ChildKiller trait.  This makes the concept of waiting
for the Child distinct from signalling it and explicitly allows
getting a separate object that can be used for signalling.

With that in place, we're forced to implement something appropriate
for the ssh pty implementations; one in the pty crate itself,
one in wezterm-ssh and the wrapper that we use in the mux crate.

The upshot of this is that the `CloseCurrentPane` action now operates
correctly on panes that were the result of split operations.
2021-12-11 08:40:26 -07:00
Wez Furlong
1d2b2cd34f cargo update 2021-12-10 15:26:10 -07:00
Wez Furlong
ebc6e6f8b9 Pick up updated ssh crate + windows fixes 2021-12-10 15:25:48 -07:00
Wez Furlong
ce06d59a94 cargo update 2021-12-05 19:07:49 -07:00
Wez Furlong
f16f4329a4 cargo update 2021-11-28 19:09:45 -07:00
Wez Furlong
225e7a1243 introduce unicode_version config
This is a fairly far-reaching commit. The idea is:

* Introduce a unicode_version config that specifies the default level
  of unicode conformance for each newly created Terminal (each Pane)
* The unicode_version is passed down to the `grapheme_column_width`
  function which interprets the width based on the version
* `Cell` records the width so that later calculations don't need to
  know the unicode version

In a subsequent diff, I will introduce an escape sequence that allows
setting/pushing/popping the unicode version so that it can be overridden
via eg: a shell alias prior to launching an application that uses a
different version of unicode from the default.

This approach allows output from multiple applications with differing
understanding of unicode to coexist on the same screen a little more
sanely.

Note that the default `unicode_version` is set to 9, which means that
emoji presentation selectors are now by-default ignored.  This was
selected to better match the level of support in widely deployed
applications.

I expect to raise that default version in the future.

Also worth noting: there are a number of callers of
`unicode_column_width` in things like overlays and lua helper functions
that pass `None` for the unicode version: these will assume the latest
known-to-wezterm/termwiz version of unicode to be desired. If those
overlays do things with emoji presentation selectors, then there may be
some alignment artifacts. That can be tackled in a follow up commit.

refs: #1231
refs: #997
2021-11-25 09:00:45 -07:00
Wez Furlong
591e1f593c termwiz: import widechar_width wcwidth implementation
This commit adopts the use of https://github.com/ridiculousfish/widecharwidth/
to determine the width of a character.

This allows removing a couple of other rust deps that are no longer
needed, but doesn't otherwise change the behavior.

refs: https://github.com/wez/wezterm/issues/1231
2021-11-24 18:11:59 -07:00
Wez Furlong
bf9a95ea1b remove our incomplete allsorts shaper implementation
We rely on using freetype in order to support more fonts in more
situations, and we have a deeper existing integration with harfbuzz.

I'm unlikely to come back to allsorts to complete our integration,
and in the meantime, it just adds overhead to build/test and those
builds are taking longer and longer.

I loved the idea of using pure rust for all the font stuff, but
its time is not now.

closes: #587
closes: #66
2021-11-23 05:43:13 -07:00
Wez Furlong
f9ce727281 remove wgpu from window test deps
We don't use this and all it really does it make `cargo test`
take longer
2021-11-23 05:39:07 -07:00
Wez Furlong
3f63f4a2e2 prep for wezterm-ssh release 2021-11-23 05:35:51 -07:00
Wez Furlong
30cb55a7bd pty: bump version
The changes in #1275 introduce an API change, so let's not forget to
bump this.
2021-11-23 05:22:32 -07:00
Wez Furlong
03a17f8ed6 cargo update again 2021-11-22 12:17:10 -07:00
Wez Furlong
f28c1dc626 cargo update 2021-11-22 07:41:03 -07:00
Wez Furlong
0ed48f7666 cargo update
Mostly to pick up a libssh fix on arm

refs: https://github.com/wez/libssh-rs/issues/2
2021-11-14 15:45:37 -07:00
Wez Furlong
a6da956859 cargo update 2021-11-08 07:57:40 -07:00