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

3008 Commits

Author SHA1 Message Date
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
Wez Furlong
7cf68365a5 deps: misc updates 2020-12-29 09:24:34 -08:00
Wez Furlong
80411d7db9 simplify passing the TerminalSize to the terminal
Following on from 8649056ac0,
this commit should make it harder to make a similar mistake
in the future, by introducing a new TerminalSize struct for
that purpose.
2020-12-29 09:06:26 -08:00
Wez Furlong
ba62f4fed0 clarify split docs
I've seen a number of people copy and paste the example that runs
`top` and be confused by it, so try to make it a bit clearer how
to get a regular split with a shell inside it.
2020-12-29 08:40:52 -08:00
Wez Furlong
da55e12b5e Add selection_word_boundary configuration option
refs: https://github.com/wez/wezterm/issues/405
2020-12-28 14:13:25 -08:00
Wez Furlong
94ca16d987 gui: round x-coordinate when selecting text
But don't round the y-coordinate as that one seems OK.

refs: https://github.com/wez/wezterm/issues/350
2020-12-28 13:44:30 -08:00
Wez Furlong
c68bf92bcd window: implement FullScreen for x11
refs: https://github.com/wez/wezterm/issues/177
2020-12-28 10:59:53 -08:00
Wez Furlong
4d8cc1bb26 font: consider "random" glyphs when computing metrics for symbol fonts
If a font doesn't have any latin glyphs then we'd compute 0 as the
average width.  Later, during rendering, we'd compute an `inf` scaling
factor and then subsequently fail to allocate texture space.

This commit takes the average width from a "random" selection of glyphs
(whatever the first few glyphs in the font may be) to avoid that
situation.

refs: https://github.com/wez/wezterm/issues/404
2020-12-28 09:02:30 -08:00
Wez Furlong
7cbbb49ab4 deps: ordered-float -> 2.0 2020-12-28 08:25:43 -08:00
Wez Furlong
f4ba55d078 cargo update 2020-12-28 08:23:20 -08:00
Wez Furlong
f8f8dc7240 remove now-dead code 2020-12-27 22:37:52 -08:00
Wez Furlong
d302f82335 window+gui: macOS: add native_macos_fullscreen_mode option
Defaults to false.  If set to true, the ToggleFullScreen action
prefers native macOS fullscreen mode.

refs: https://github.com/wez/wezterm/issues/177
2020-12-27 22:34:31 -08:00
Wez Furlong
cd997cbe48 window+gui: migrate prefer_egl to WindowConfiguration 2020-12-27 22:06:04 -08:00
Wez Furlong
228356105e window+gui: migrate enable_wayland to WindowConfiguration 2020-12-27 22:00:51 -08:00
Wez Furlong
fb53f98295 window+gui: migrate windows dead keys config to WindowConfiguration
untested as I'm on a mac, but seems like it might compile...
2020-12-27 21:56:16 -08:00
Wez Furlong
44ca61da66 window+gui: introduce WindowConfiguration trait
This adopts a similar technique to that used to pass the wezterm
config to the term crate, but this time it is for passing it to
the window crate.

The use_ime option has been ported over to this new mechanism.
2020-12-27 21:51:56 -08:00