1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-18 10:52:16 +03:00
Commit Graph

3223 Commits

Author SHA1 Message Date
Wez Furlong
42f3a729a8 gui: fix OutOfTextureSpace error when scaling to large font sizes
refs: https://github.com/wez/wezterm/issues/428
2021-01-16 08:12:45 -08:00
Wez Furlong
30b262c1c0 gui: tidy up RenderState enum
Since we no longer have our fallback Software renderer (only mesa),
remove what has become an empty variant and hoist the GL state up
into RenderState, holding Option<RenderState> in the window.
2021-01-16 08:00:17 -08:00
Wez Furlong
42b95cd413 ci: generate universal binaries for macOS
This persuades the CI to install both the arm and intel flavors
of the rust toolchain on macOS, and the deploy script to generate
a universal binary.

* need big sur to build for M1
* Use cross-compilation compatible mlua from my fork for now
2021-01-13 20:11:58 -08:00
Wez Furlong
f39c4f9d6e deps: update to mlua 0.5 2021-01-13 10:06:35 -08:00
Wez Furlong
bd614b5e02 cargo update 2021-01-11 08:43:32 -08:00
Brad Alfirevic
6439435178 Fix get-deps on arch 2021-01-09 15:23:38 -08:00
Wez Furlong
dcce17b895 vtparse: add doc for CsiParam 2021-01-09 09:42:29 -08:00
Wez Furlong
d2e31148a0 wezterm: workaround appimage startup issue
AppImage passes fd 1023 opened on the mount point directory.
If we close this prior to exec, some magic in appimage decides
to unmount the fuse mount right before we're about to exec
the wezterm-gui binary from the appimage.

So, don't close stray fds when the cli spawns the gui when
we're an appimage.

See also: e831032c72

closes: #419
2021-01-09 08:22:17 -08:00
Wez Furlong
ce6ecc1f38 termwiz: really fixup windows build 2021-01-08 09:33:08 -08:00
Wez Furlong
3a9ab729db termwiz: fixup win32 build 2021-01-08 08:55:43 -08:00
Wez Furlong
5d360ae365 termwiz: Remove anyhow::Result from public API
It's been replaced with an opaque termwiz error type instead.

This is a bit of a more conservative approach than that in (refs: #407)
and has less of an impact on the surrounding code, which appeals to
me from a maintenance perspective.

refs: #406
refs: #407
2021-01-08 00:32:30 -08:00
Wez Furlong
713da95a02 fix build on windows
refs: #416
2021-01-07 09:38:45 -08:00
Wez Furlong
5fb0c05541 Add changelog entry for umask issue
refs: #416
2021-01-07 09:37:27 -08:00
Wez Furlong
db0d54cf44 Take care to restore the original umask
wezterm sets a more restrictive umask (`0o077`) by default so that any files
that it creates (eg: unix domain socket, log files) are more secure
by default.

However, some environments rely on the more general default of (`0o022`)
without checking that it is set.

This matters because programs spawned by wezterm inherit its more
restricted umask.

I hadn't noticed this because I've had `umask 022` in my shell RC files
since sometime in the 1990's.

This commit adds some plumbing to the pty layer to specify an optional
umask for the child process, and some more to our umask saver helper
so that any thread can determine the saved umask without needing a
reference to the saver itself, which may be in a different crate.

The logic in the config crate has been adjusted to connect the saved
value to the default command builder arguments.

The net result of this is that running `wezterm -n start bash -- --norc`
and typing `umask` in the resultant window now prints `0022`.

refs: #416
2021-01-07 09:20:13 -08:00
Wez Furlong
704dd9aa44 revise changelog for undercurl
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 22:50:45 -08:00
Wez Furlong
88ebe79fdf add wezterm.terminfo source
You can install this into your $TERMINFO directory (default is
`$HOME/.terminfo`) by running:

`tic -x wezterm.terminfo`

from this data directory.

Once installed, you can set `TERM=wezterm`.

refs: https://github.com/wez/wezterm/issues/415
2021-01-06 18:44:53 -08:00
Wez Furlong
e1f7edaeb3 recognize the : form of the true color CSI/SGR encoding
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 18:20:42 -08:00
Wez Furlong
3df0201d42 recognize kitty style CSI 4:3 m underlines
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 17:59:54 -08:00
Wez Furlong
b6a422a542 vtparse: allow for CSI parameters to be : separated
This allows us to support the kitty style underline sequence,
or the : separated form of the true color escape sequences.

refs: https://github.com/wez/wezterm/issues/415
2021-01-06 16:58:58 -08:00
Wez Furlong
eba263c8dd cargo update 2021-01-06 00:28:11 -08:00
Wez Furlong
387b3487aa docs: changelog for undercurl
refs: https://github.com/wez/wezterm/issues/415
2021-01-06 00:25:04 -08:00
Wez Furlong
697d41aeb1 Render the various underline styles
```
$ printf "\x1b[58;2;255;0;0m\x1b[4msingle\x1b[21mdouble\x1b[60mcurly\x1b[61mdotted\x1b[62mdashed\x1b[0m"
```

refs: https://github.com/wez/wezterm/issues/415
2021-01-05 23:46:15 -08:00
Wez Furlong
93576691fe compute most line-glyphs on-the-fly
We now have too many permutations to pre-render in the initial
texture size, so do this on the fly instead.

refs: https://github.com/wez/wezterm/issues/415
2021-01-05 14:16:21 -08:00
Wez Furlong
7c8f2b7445 respect new underline color when rendering
```
printf "\x1b[4m\x1b[58;2;255;0;0mred underline\x1b[0m"
```

prints "red underline" in the foreground color, with an
underline that is bright red `rgb(255, 0, 0)`.

refs: https://github.com/wez/wezterm/issues/415
2021-01-05 12:12:16 -08:00
Wez Furlong
b35f3aa199 Add Curly, Dotted, Dashed and colored underline concept to model
These aren't currently rendered, but the parser and model now support
recognizing expanded underline sequences:

```
CSI 24 m   -> No underline
CSI 4 m    -> Single underline
CSI 21 m   -> Double underline
CSI 60 m   -> Curly underline
CSI 61 m   -> Dotted underline
CSI 62 m   -> Dashed underline

CSI 58 ; 2 ; R ; G ; B m   -> set underline color to specified true color RGB
CSI 58 ; 5 ; I m           -> set underline color to palette index I (0-255)
CSI 59                     -> restore underline color to default
```

The Curly, Dotted and Dashed CSI codes are a wezterm assignment in the
SGR space.  This is by no means official; I just picked some numbers
that were not used based on the xterm ctrl sequences.

The color assignment codes 58 and 59 are prior art from Kitty.

refs: https://github.com/wez/wezterm/issues/415
2021-01-05 10:29:36 -08:00
Wez Furlong
386032bdee docs: fix custom event example 2021-01-01 20:07:46 -08:00
Wez Furlong
b8cabc50bc include wezterm version in opengl init log line 2020-12-30 12:07:49 -08:00
Wez Furlong
b5e5f2a764 window: fix painting on x11
Need to clear paint_all otherwise we don't settle and flush buffers.
2020-12-30 09:42:16 -08:00
Félix Saparelli
1762ccd761
Instruct docs.rs to build with widgets and serde features (#409) 2020-12-30 09:25:54 -08:00
Wez Furlong
a9eaf55747 fixup windows build 2020-12-29 16:59:59 -08:00
Wez Furlong
234fe40be6 compare_and_swap -> compare_exchange
Nightly Rust (which I'm using for M1 builds) deprecates the former
so switch to the latter.
2020-12-29 16:41:55 -08:00
Wez Furlong
4e2cd574b7 adjust log levels in mux-server 2020-12-29 16:33:58 -08:00
Wez Furlong
154ab20d0e wezterm-gui: we now start an implicit unix mux server
When running the GUI, we generate a unix domain socket path for
the current process and start up a mux server for that path.

This allows `wezterm cli list` and `wezterm cli split-pane` to
work implicitly inside the GUI session.

When started in this way, the mux server is not persistent;
when the GUI process is terminated, all of its windows, tabs
and panes are terminated.

refs: https://github.com/wez/wezterm/issues/230
2020-12-29 15:58:39 -08:00
Wez Furlong
1c0817b2b2 mux: factor out server bits to helper crate 2020-12-29 15:25:15 -08:00
Wez Furlong
cc4cdd81b3 window: remove avx code in bitmaps/mod.rs
I don't think it is worth the complexity of keeping this around;
we rarely do direct bitmap stuff any more.
2020-12-29 14:26:57 -08:00
Wez Furlong
c73e1d3924 window: remove PaintContext 2020-12-29 13:53:20 -08:00
Wez Furlong
38a0137660 window: remove now-dead code on Windows 2020-12-29 13:42:18 -08:00
Wez Furlong
1ca2aeaeb4 window: remove now-dead code for x11/wayland 2020-12-29 13:40:50 -08:00
Wez Furlong
1af1c85818 window: fixup build for x11/wayland 2020-12-29 13:35:59 -08:00
Wez Furlong
4f80fd9bcd window: macos: remove dead code 2020-12-29 13:29:59 -08:00
Wez Furlong
cf6914c5d8 window: remove non-opengl paint, rename paint_opengl -> paint 2020-12-29 13:25:35 -08:00
Wez Furlong
972c07a692 window: update examples for opengl-only-ness 2020-12-29 13:15:16 -08:00
Wez Furlong
5a3c6a6b15 window: macos: remove non-opengl back buffer 2020-12-29 12:52:44 -08:00
Wez Furlong
709682079e window: macos: refactor now opengl is always enabled
Hoist opengl out of a submodule.
2020-12-29 12:47:25 -08:00
Wez Furlong
cf418c34e3 window: consolidate opengl_initialize with created callback
Since we now always init opengl and fail to create a window if that
fails, may as well combine these two callbacks.
2020-12-29 12:44:39 -08:00
Wez Furlong
ec7d511750 window: implicitly enable_opengl at new_window creation 2020-12-29 12:31:25 -08:00
Wez Furlong
4c22de9f6d window: make opengl always required 2020-12-29 12:13:23 -08:00
Wez Furlong
cf2dcff362 changelog: note about not leaking fds from gnome, too 2020-12-29 11:37:53 -08:00
Wez Furlong
6578d657b3 add ` to the default selection_word_boundary config 2020-12-29 11:34:55 -08:00
Wez Furlong
dc2efb0b43 fix tests after 80411d7db9 2020-12-29 11:28:43 -08:00