1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 11:17:15 +03:00
Commit Graph

374 Commits

Author SHA1 Message Date
Wez Furlong
a55ba2be35 ssh: maybe fix build 2021-10-20 07:53:55 -07:00
Wez Furlong
d74ffbfb75 and capture cargo.lock too 2021-10-20 07:25:03 -07:00
Wez Furlong
58ad4a2c4b ssh: update to fixed win32 build
refs: #1014
2021-10-19 21:04:56 -07:00
Wez Furlong
8be442e39b ssh: can now pass e2e tests using libssh backend 2021-10-19 20:33:30 -07:00
Wez Furlong
9d44cc1720 ssh: introduce SftpWrap 2021-10-19 20:33:30 -07:00
Wez Furlong
a8b64a2756 Run with libssh
This works, but on macOS, there is a segfault in openssl when the
session is closed... I'm going to try this on Linux to see if it
is consistent behavior and ponder next steps.
2021-10-19 20:33:30 -07:00
Wez Furlong
f1e5c59566 ssh: introduce wrapper enum
This is a pre-cursor step to adding libssh support
2021-10-19 20:33:30 -07:00
Wez Furlong
d461c1c0b6 deps: lru 0.6 -> 0.7 2021-10-10 19:29:42 -07:00
Wez Furlong
ebd938cadf cargo update 2021-10-10 19:15:00 -07:00
Wez Furlong
774f845289 Enable toast notifications on freebsd
refs: https://github.com/wez/wezterm/issues/489
2021-10-10 17:18:52 -07:00
Wez Furlong
d635512138 wezterm-ssh: restore dep after cargo publish 2021-10-10 16:38:03 -07:00
Wez Furlong
163783f483 wezterm-ssh: prep for cargo publish 2021-10-10 16:35:12 -07:00
Wez Furlong
2da43e3666 ssh: unwrap -> error handling
The port number is guaranteed to be set in the config parser,
just like for the host and user, so the unwrap is "OK", but it's
less brittle to handle the error consistent with the others here.
2021-10-10 15:03:21 -07:00
Chip Senkbeil
2415a44d74 Switch to camino::{Utf8PathBuf, Utf8Path} 2021-10-10 14:54:45 -07:00
Chip Senkbeil
1ff2a1eb82 Add bitflags type safety to sftp flags 2021-10-10 14:54:45 -07:00
Chip Senkbeil
7d5c301c66 Ensure /run/sshd exists, explicitly set username in sshd fixture, add back use_privilege_mode no 2021-10-10 14:54:45 -07:00
Chip Senkbeil
072bb1c470 Create SftpError type and associated structs to provide more verbose errors for sftp 2021-10-10 14:54:45 -07:00
Chip Senkbeil
fca3bd6904 Add some initial tests to wezterm-ssh, ignoring read/write of file as those are hanging 2021-10-10 14:54:45 -07:00
Chip Senkbeil
9c8bdfd177 Add untested sftp methods 2021-10-10 14:54:45 -07:00
Wez Furlong
bb2c534a56 ssh: my openssl+windows ssh2 patch was published upstream
So remove my local patch
2021-10-10 07:29:54 -07:00
Wez Furlong
68418b89ee deps: cargo update 2021-10-03 22:10:01 -07:00
Wez Furlong
9db9db29b7 cargo update 2021-09-19 18:22:12 -07:00
Wez Furlong
e6513e30a5 cargo update 2021-09-13 08:34:47 -07:00
Wez Furlong
93e18b2a01 deps: colorgrad -> 0.5 2021-09-05 23:27:01 -07:00
Wez Furlong
3f5fb5b76f cargo update 2021-09-05 23:23:40 -07:00
Wez Furlong
3ff5ea7f75 cargo update 2021-08-29 21:30:03 -07:00
Wez Furlong
e9bf8767e2 cargo update for latest xcb-imdkit
refs: #1064
2021-08-25 18:57:57 -07:00
Wez Furlong
155948a29b cargo update 2021-08-25 10:00:33 -07:00
Wez Furlong
f09d747f14 window: use released xcb-imdkit crate
refs: #250
2021-08-23 09:09:45 -07:00
Wez Furlong
dfad493266 unpin rcgen, update to 0.8.13
refs: https://github.com/est31/rcgen/issues/63
2021-08-23 09:07:53 -07:00
Wez Furlong
dd31d172e9 filedescriptor: 0.8.1 release 2021-08-23 08:59:44 -07:00
Wez Furlong
5629e0c1ca deps: tiny-skia -> 0.6 2021-08-23 07:48:13 -07:00
Wez Furlong
a7fa2fe0e1 pin rcgen to 0.8.11
0.8.12 breaks the API by removing Send+Sync from Certificate;
pin until that is resolved.

refs: https://github.com/est31/rcgen/issues/63
2021-08-23 07:45:35 -07:00
Wez Furlong
6f404d8692 cargo update 2021-08-23 07:33:44 -07:00
HMH
6404099d25
IME support on X11 (#1043)
* WIP: IME support for X11

* Handle text generated by IME.

* Set IME position according to the cursor position.

* Improve IME position handling.

Geometry as well as window focus changes are now handled.

* Dispatch IME strings like it's done on windows.

* Make sure not to silently drop IME errors.

* Respect `use_ime` configuration.

* Add xcb-util as dependency.

* Only update IME position if necessary.

* Formatting.

* Update xcb-imdkit-rs.

* Set IME position under the start of the cursor.

This seems to be the way it is commonly done among gui frameworks.
(Tested with Firefox for GTK and Konsole for QT).

* Update xcb-imdkit-rs.

* Handle systems only providing libxcb-util0-dev.

* Add libxcb to freebsd dependencies.

Required by xcb-imdkit-rs.

* Update xcb-imdkit-rs.

* Try to use more recent gcc on centos7.

* More recent C++ compiler on centos7 as well.

* Also setup correct env on centos7 for tests.
2021-08-19 20:51:56 -07:00
Wez Furlong
ab21910d80 deps: update bitflags -> 1.3 2021-08-15 18:21:17 -07:00
Wez Furlong
57da0a4013 cargo update 2021-08-15 18:17:02 -07:00
Wez Furlong
d9e0340a94 gui: add some randomness to gradients to avoid banding 2021-08-13 13:35:55 -07:00
Wez Furlong
746951416b gui: tidy up gradient calculation 2021-08-13 12:14:14 -07:00
Wez Furlong
cbfb6d59c5 added new window_background_gradient config option 2021-08-12 23:08:38 -07:00
Wez Furlong
d51f5f7670 termwiz: improve performance of emoji presentation lookup 2021-08-11 23:06:16 -07:00
Wez Furlong
ee71d478c4 window+gui: enable dual source blending
This replaces the slightly gnarly subpixel enabled blending in the
shader with Dual Source Blending, which is a technique where the
fragment shader can specify both the primary color (RGBA) as well
as an additional per-channel mask that can be used to alpha blend
with the destination.

This enables artifact-free alpha blending when used together
with a transparent window background.

refs: https://github.com/wez/wezterm/issues/932
2021-08-10 18:23:18 -07:00
Wez Furlong
eae327efcc model: replace LineBits::DIRTY with a sequence number
Terminal now maintains a sequence number that increments
for each Action that is applied to it.

Changes to lines are tagged with the current sequence number.

This makes it a bit easier to reason about when an individual
line has changed relative to some point in "time"; the consumer
of the terminal can sample the current sequence number and then
can later determine which lines have changed since that point
in time.

refs: https://github.com/wez/wezterm/issues/867
2021-08-08 12:45:08 -07:00
Wez Furlong
e85e94248b basic kitty img animation support
this is the bare minimum to squeak by with notcurses; it currently
only supports editing single frame images.

refs: #986
2021-08-02 21:35:57 -07:00
Wez Furlong
90b16b9518 move image decoding into termwiz
Adds a use_image feature to termwiz that enables an optional
dep on the image crate.  This in turn allows decoding of animation
formats (gif, apng) from file data, but more crucially, allows
modeling animation frames at the termwiz layer, which is a pre-req
for enabling kitty img protocol animation support.

refs: #986
2021-08-02 21:35:50 -07:00
Wez Furlong
b862c8d111 termwiz: add ImageData::hash
Moves the localized hashing logic from term -> termwiz
where it can be re-used.

refs: #986
2021-08-02 09:18:25 -07:00
Wez Furlong
a0da69f56b cargo update 2021-08-01 18:40:25 -07:00
Wez Furlong
96f15a065c kitty img: add deflate support
Untested... it compiles!

refs: #986
2021-07-28 09:29:40 -07:00
Wez Furlong
227e375a5f deps: cargo update 2021-07-26 08:16:03 -07:00
Wez Furlong
a1f55049c5 deps: upgrade open 1.4 -> 2.0
The main difference is that it can now use `wslview` to open things
across wsl boundaries.

closes: #982
2021-07-26 08:15:02 -07:00
Autumn Lamonte
d2e2c5dec6 #133 clean up DECREQTPARM 2021-07-24 23:19:51 -07:00
Autumn Lamonte
31aff81884 #133 DECREQTPARM - needs cleanup 2021-07-24 23:10:52 -07:00
Wez Furlong
6ddc8afc64 termwiz: recognize the XTGETTCAP DCS sequence
Parse and respond to this sequence docs can be found
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Device-Control-functions:DCS-plus-q-Pt-ST.F95

refs: https://github.com/wez/wezterm/issues/954
2021-07-24 21:06:48 -07:00
Wez Furlong
a2e882a7cb deps: cargo update, and a couple of dependabot suggestions 2021-07-18 19:10:46 -07:00
Wez Furlong
a697b30223 window: add xsettings support on X11 systems
This allows reading xsettings which contain information about
both the active theme as well as the DPI.

refs: #947
2021-07-18 12:54:52 -07:00
Wez Furlong
a7326f6c41 cargo update 2021-07-11 20:08:24 -07:00
Wez Furlong
566243ade5 mux: add some metrics around reading from ptys 2021-07-10 21:06:54 -07:00
Wez Furlong
fc4c165ca3 window: update wgpu -> 0.9
This is still used only in an example
2021-07-09 20:37:34 -07:00
Wez Furlong
91d6344180 weird dependency hack for mac+windows
Adding an edge from wezterm-ssh -> async_ossl causes the
openssl vendoring feature selection logic to trigger, which
in turn allows `cargo build -p window --examples` to succeed
again on macos.
2021-07-09 20:34:42 -07:00
Wez Furlong
aac2e78970 update http_req -> 0.8
0.8 doesn't seem to build with rusttls, but I don't think
we need that any more: we've been using vendored openssl on windows
and mac for some time.

closes: #924
refs: https://github.com/jayjamesjay/http_req/issues/48
2021-07-07 13:37:57 -07:00
Wez Furlong
4f29f2bc80 cargo update 2021-07-07 13:27:16 -07:00
Wez Furlong
5044fcb98b cargo update 2021-06-27 22:46:19 -07:00
Wez Furlong
0a00ffe98b wayland: fix key repeat
The main culprit was the calloop feature that is used by default
in the underlying SCTK crate.

This commit:

* Routes keyboard processing via the same keyboard mapping code
  that we use for X11
* Implements key repeats directly, and with awareness of elapsed
  time in case the repeat rate is quicker than the event dispatching
  quantum
* Disables the calloop feature of SCTK and let us do our own polling
  of the wayland connection.

Critically, key repeat is sticky and unpredictable while calloop is
enabled.

closes: #669
2021-06-27 14:29:03 -07:00
Wez Furlong
edbb446183 deps: cargo update 2021-06-26 22:58:42 -07:00
Wez Furlong
e69869efa7 refactor deps so that window can depend on wezterm-font
I want to use this to render the font in the title bar
2021-06-26 22:58:42 -07:00
Wez Furlong
d04486f30a wayland: replace andrew with tiny_skia
This has the consequence of removing the title bar text when
client side decorations are in use.
2021-06-26 22:58:42 -07:00
Wez Furlong
d1177a29c2 wayland: update to SCTK 0.14 2021-06-26 22:58:42 -07:00
Wez Furlong
355b2f5b5a wayland: import ConceptFrame impl from SCTK
This has been removed in a later version, so pull it in ahead
of updating that dependency to verify that it builds.
2021-06-26 22:58:42 -07:00
Wez Furlong
4c0d789ac3 zeno -> tiny_skia
Mostly so that we can turn off anti-aliasing for smaller sizes,
but it also happens to be more complete anyway.
2021-06-25 22:55:42 -07:00
Wez Furlong
07799d0ab3 cargo update 2021-06-20 19:06:54 -07:00
Wez Furlong
1be3d016b1 deps: windows 0.9 -> 0.11
closes: #872
2021-06-16 08:29:09 -07:00
Wez Furlong
35b267677b cargo update 2021-06-13 23:36:22 -07:00
Wez Furlong
6c702b568f glyphcache: adopt zeno crate for drawing
This changes the fill_rect function over to use the zeno crate.
zeno allows describing a path and filling or stroking.
This commit doesn't strictly need that, but it sets things
up for more interesting custom glyphs in later commits.

refs: #584
refs: #588
2021-06-13 15:49:37 -07:00
Wez Furlong
4feefdd04a cargo update 2021-06-07 08:32:05 -07:00
Wez Furlong
86cad2b1b0 cargo update 2021-05-30 23:06:36 -07:00
Wez Furlong
3093fb3eb6 wezterm-ssh: process Include statements
refs: https://github.com/wez/wezterm/issues/824
2021-05-28 22:16:24 -07:00
Wez Furlong
3f6ff534d3 windows: fix lingering cmd.exe panes
Since removing the regular periodic background tasks, we're now
prone to not noticing child processes exiting.

This commit explicictly schedules a thread to do that on Windows
so that we can close a tab as soon as it exits.
2021-05-28 15:11:29 -07:00
Wez Furlong
030e517b43 deps: metrics 0.15 -> 0.16, cargo update 2021-05-24 07:57:03 -07:00
Wez Furlong
f78190ec9c filedescriptor: remove anyhow from public interface
Use thiserror instead
2021-05-23 14:24:01 -07:00
Arvedui
dbc278e59a Fix spawning new tabs/windows in directory with urlunsafe paths
The CWD is internally stored as URL. The path component is therefore
stored percent_encoded. It must be decoded before use.
2021-05-18 08:33:06 -07:00
Wez Furlong
bf0320624d cargo update 2021-05-17 07:28:56 -07:00
Wez Furlong
a59e9b1706 update metrics 0.14 -> 0.15
closes: https://github.com/wez/wezterm/pull/778
2021-05-11 19:20:24 -07:00
Wez Furlong
965e413c52 cargo update 2021-05-11 17:03:06 -07:00
Wez Furlong
4e6f341f10 window: wayland support is no longer optional at build time 2021-05-08 17:48:58 -07:00
Wez Furlong
058c3f612f add wgpu example 2021-05-08 09:36:19 -07:00
Wez Furlong
c4e1f2434a add raw-window-handle impls 2021-05-08 09:36:19 -07:00
Wez Furlong
d56bfd0b7f window: separate gui window state from app state
Removes the callbacks type and replaces event dispatch with
an async capable channel.

This makes it a bit simpler to model some of the window internals,
and to prepare for a wgpu enabled future.

This changes have been tested only on linux so far.
2021-05-08 09:36:19 -07:00
Wez Furlong
d64b785290 deps: update windows dep to 0.4 -> 0.9
dependabot keeps trying and failing because lots of things changed.
Let's try and get ahead of it...
2021-05-03 22:05:35 -07:00
Wez Furlong
4af66ff4b1 wezterm-ssh: prep for release 2021-05-03 09:57:04 -07:00
Wez Furlong
7be475efb7 cargo update 2021-05-03 09:34:29 -07:00
Wez Furlong
8b71a57513 add debug overlay
Adds a `ShowDebugOverlay` key assignment that will create a tab
overlay that shows a limited number of recently logged events.

refs: https://github.com/wez/wezterm/issues/641
2021-05-03 09:19:38 -07:00
Wez Furlong
0c4c129b91 fonts: use toast notification for missing glyph notification
Popping open the config error window is a bit of overkill
2021-05-01 16:45:57 -07:00
Artur Sinila
faaf6dea30 cargo update 2021-05-01 11:29:39 -07:00
Wez Furlong
5b9be21165 prep for pty 0.4 release 2021-04-30 10:17:25 -07:00
Wez Furlong
d6c8eb1e3b benchmarking shaping
`cargo test --release -p wezterm-gui -- --nocapture bench_shaping`:

```
running 1 test
100: 139.82µs
1000: 385.333µs
10000: 3.144203ms
test shapecache::test::bench_shaping ... ok
```
2021-04-27 21:48:15 -07:00
Wez Furlong
7e996950f6 add wezterm.truncate_to_width
refs: https://github.com/wez/wezterm/issues/647
2021-04-26 22:27:12 -07:00
Wez Furlong
9028da0a82 cargo update 2021-04-26 08:34:45 -07:00
Wez Furlong
9ddbcb4541 cargo update 2021-04-19 09:23:33 -07:00
Wez Furlong
b0f5e673c6 vtparse/termwiz: prep for release 2021-04-14 13:04:23 -07:00
Wez Furlong
2e34f1a8dd Add wezterm ls-fonts subcommand
At this time it just shows you the fonts that your config matches
and where they came from:

```
; wezterm -n ls-fonts
Primary font:
  wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
    (<built-in>, BuiltIn)

When Italic=true:
  wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=true)
    (/home/wez/.fonts/JetBrainsMono-Italic.ttf, FontConfig)

  wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
    (<built-in>, BuiltIn)

When Intensity=Bold:
  wezterm.font("JetBrains Mono", weight="Bold", stretch="Normal", italic=false)
    (/home/wez/.fonts/JetBrainsMono-Bold.ttf, FontConfig)

  wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
    (<built-in>, BuiltIn)

When Intensity=Bold Italic=true:
  wezterm.font("JetBrains Mono", weight="Bold", stretch="Normal", italic=true)
    (/home/wez/.fonts/JetBrainsMono-Bold-Italic.ttf, FontConfig)

  wezterm.font("JetBrains Mono", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/JetBrainsMono-Regular.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Noto Color Emoji", weight="Regular", stretch="Normal", italic=false)
    (/home/wez/.fonts/NotoColorEmoji.ttf, FontConfig)

  wezterm.font("Last Resort High-Efficiency", weight="Regular", stretch="Normal", italic=false)
    (<built-in>, BuiltIn)

```

refs: #347
2021-04-12 09:44:27 -07:00