2020-10-25 02:40:15 +03:00
|
|
|
[package]
|
|
|
|
name = "wezterm-gui"
|
|
|
|
version = "0.1.0"
|
|
|
|
authors = ["Wez Furlong <wez@wezfurlong.org>"]
|
|
|
|
edition = "2018"
|
|
|
|
build = "build.rs"
|
2021-03-25 19:34:00 +03:00
|
|
|
resolver = "2"
|
2020-10-25 02:40:15 +03:00
|
|
|
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
|
2021-06-27 03:05:22 +03:00
|
|
|
[features]
|
|
|
|
default = ["wayland"]
|
|
|
|
wayland = ["window/wayland"]
|
2022-07-11 02:34:43 +03:00
|
|
|
distro-defaults = ["config/distro-defaults"]
|
2021-06-27 03:05:22 +03:00
|
|
|
|
2020-10-25 02:40:15 +03:00
|
|
|
[build-dependencies]
|
|
|
|
anyhow = "1.0"
|
|
|
|
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
2022-07-04 04:27:21 +03:00
|
|
|
embed-resource = "1.7"
|
2020-10-25 02:40:15 +03:00
|
|
|
cc = "1.0"
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
anyhow = "1.0"
|
2021-08-16 04:21:17 +03:00
|
|
|
bitflags = "1.3"
|
2021-05-03 06:50:01 +03:00
|
|
|
chrono = {version="0.4", features=["unstable-locales"]}
|
2022-05-28 17:07:52 +03:00
|
|
|
clap = {version="3.1", features=["derive"]}
|
2020-10-25 02:40:15 +03:00
|
|
|
codec = { path = "../codec" }
|
2022-06-13 06:17:48 +03:00
|
|
|
colorgrad = "0.6"
|
2020-10-25 02:40:15 +03:00
|
|
|
config = { path = "../config" }
|
|
|
|
downcast-rs = "1.0"
|
2021-12-22 19:17:29 +03:00
|
|
|
dirs-next = "2.0"
|
2020-10-25 09:21:03 +03:00
|
|
|
env-bootstrap = { path = "../env-bootstrap" }
|
2020-12-10 21:03:16 +03:00
|
|
|
euclid = "0.22"
|
2021-12-20 18:15:56 +03:00
|
|
|
fastrand = "1.6"
|
2021-05-24 00:24:01 +03:00
|
|
|
filedescriptor = { version="0.8", path = "../filedescriptor" }
|
2022-06-17 17:46:25 +03:00
|
|
|
futures = "0.3"
|
2022-01-04 18:45:15 +03:00
|
|
|
fuzzy-matcher = "0.3"
|
2020-10-25 02:40:15 +03:00
|
|
|
hdrhistogram = "7.1"
|
2021-07-07 23:37:57 +03:00
|
|
|
http_req = "0.8"
|
2022-02-07 04:51:32 +03:00
|
|
|
image = "0.24"
|
2020-10-25 02:40:15 +03:00
|
|
|
lazy_static = "1.4"
|
|
|
|
libc = "0.2"
|
|
|
|
log = "0.4"
|
2021-10-11 05:29:42 +03:00
|
|
|
lru = "0.7"
|
2020-10-25 02:40:15 +03:00
|
|
|
luahelper = { path = "../luahelper" }
|
2021-07-19 05:10:46 +03:00
|
|
|
metrics = { version="0.17", features=["std"]}
|
2022-06-17 17:46:25 +03:00
|
|
|
mlua = {version="0.8.0-beta.4", features=["send"]}
|
2020-10-25 02:40:15 +03:00
|
|
|
mux = { path = "../mux" }
|
2022-06-28 06:28:26 +03:00
|
|
|
mux-lua = { path = "../lua-api-crates/mux" }
|
2022-06-13 06:17:48 +03:00
|
|
|
open = "3.0"
|
2022-05-02 07:43:22 +03:00
|
|
|
ordered-float = "3.0"
|
2020-10-25 02:40:15 +03:00
|
|
|
portable-pty = { path = "../pty", features = ["serde_support", "ssh"]}
|
|
|
|
promise = { path = "../promise" }
|
2021-12-27 19:49:22 +03:00
|
|
|
pulldown-cmark = "0.9"
|
2020-10-25 02:40:15 +03:00
|
|
|
rangeset = { path = "../rangeset" }
|
|
|
|
ratelim= { path = "../ratelim" }
|
|
|
|
regex = "1"
|
|
|
|
serde = {version="1.0", features = ["rc", "derive"]}
|
|
|
|
serde_json = "1.0"
|
|
|
|
serial = "0.4"
|
|
|
|
smol = "1.2"
|
|
|
|
tabout = { path = "../tabout" }
|
|
|
|
terminfo = "0.7"
|
|
|
|
termwiz = { path = "../termwiz" }
|
2022-05-19 08:49:53 +03:00
|
|
|
termwiz-funcs = { path = "../lua-api-crates/termwiz-funcs" }
|
2022-02-28 16:59:10 +03:00
|
|
|
textwrap = "0.15"
|
2020-10-25 02:40:15 +03:00
|
|
|
thiserror = "1.0"
|
2022-07-04 16:30:34 +03:00
|
|
|
tiny-skia = "0.7"
|
2020-10-25 02:40:15 +03:00
|
|
|
umask = { path = "../umask" }
|
|
|
|
unicode-normalization = "0.1"
|
2021-08-12 07:56:30 +03:00
|
|
|
unicode-segmentation = "1.8"
|
2020-10-25 02:40:15 +03:00
|
|
|
unicode-width = "0.1"
|
|
|
|
url = "2"
|
|
|
|
walkdir = "2"
|
wezterm: add experimental_bidi config option and very basic bidi
This commit is larger than it appears to due fanout from threading
through bidi parameters. The main changes are:
* When clustering cells, add an additional phase to resolve embedding
levels and further sub-divide a cluster based on the resolved bidi
runs; this is where we get the direction for a run and this needs
to be passed through to the shaper.
* When doing bidi, the forced cluster boundary hack that we use to
de-ligature when cursoring through text needs to be disabled,
otherwise the cursor appears to push/rotate the text in that
cluster when moving through it! We'll need to find a different
way to handle shading the cursor that eliminates the original
cursor/ligature/black issue.
* In the shaper, the logic for coalescing unresolved runs for font
fallback assumed LTR and needed to be adjusted to cluster RTL.
That meant also computing a little index of codepoint lengths.
* Added `experimental_bidi` boolean option that defaults to false.
When enabled, it activates the bidi processing phase in clustering
with a strong hint that the paragraph is LTR.
This implementation is incomplete and/or wrong for a number of cases:
* The config option should probably allow specifying the paragraph
direction hint to use by default.
* https://terminal-wg.pages.freedesktop.org/bidi/recommendation/paragraphs.html
recommends that bidi be applied to logical lines, not physical
lines (or really: ranges within physical lines) that we're doing
at the moment
* The paragraph direction hint should be overridden by cell attributes
and other escapes; see 85a6b178cfddee94b3ddb39c26652bbd5a973666
and probably others.
However, as of this commit, if you `experimental_bidi=true` then
```
echo This is RTL -> عربي فارسی bidi
```
(that text was sourced from:
https://github.com/microsoft/terminal/issues/538#issuecomment-677017322)
then wezterm will display the text in the same order as the text
renders in Chrome for that github comment.
```
; ./target/debug/wezterm --config experimental_bidi=false ls-fonts --text "عربي فارسی ->"
LeftToRight
0 ع \u{639} x_adv=8 glyph=300 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
2 ر \u{631} x_adv=3.78125 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
4 ب \u{628} x_adv=4 glyph=244 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
6 ي \u{64a} x_adv=4 glyph=363 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
8 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
9 ف \u{641} x_adv=11 glyph=328 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
11 ا \u{627} x_adv=4 glyph=240 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
13 ر \u{631} x_adv=3.78125 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
15 س \u{633} x_adv=10 glyph=278 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
17 ی \u{6cc} x_adv=4 glyph=664 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
19 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
20 - \u{2d} x_adv=8 glyph=276 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
21 > \u{3e} x_adv=8 glyph=338 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
```
```
; ./target/debug/wezterm --config experimental_bidi=true ls-fonts --text "عربي فارسی ->"
RightToLeft
17 ی \u{6cc} x_adv=9 glyph=906 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
15 س \u{633} x_adv=10 glyph=277 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
13 ر \u{631} x_adv=4.78125 glyph=272 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
11 ا \u{627} x_adv=4 glyph=241 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
9 ف \u{641} x_adv=5 glyph=329 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
8 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
6 ي \u{64a} x_adv=9 glyph=904 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
4 ب \u{628} x_adv=4 glyph=243 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
2 ر \u{631} x_adv=5 glyph=273 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
0 ع \u{639} x_adv=6 glyph=301 wezterm.font(".Geeza Pro Interface", {weight="Regular", stretch="Normal", italic=false})
/System/Library/Fonts/GeezaPro.ttc index=2 variation=0, CoreText
LeftToRight
0 \u{20} x_adv=8 glyph=2 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
1 - \u{2d} x_adv=8 glyph=480 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
2 > \u{3e} x_adv=8 glyph=470 wezterm.font("Operator Mono SSm Lig", {weight="DemiLight", stretch="Normal", italic=false})
/Users/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
;
```
refs: https://github.com/wez/wezterm/issues/784
2022-01-25 18:16:51 +03:00
|
|
|
wezterm-bidi = { path = "../bidi" }
|
2020-10-25 02:40:15 +03:00
|
|
|
wezterm-client = { path = "../wezterm-client" }
|
2022-05-14 18:00:03 +03:00
|
|
|
wezterm-dynamic = { path = "../wezterm-dynamic" }
|
2020-10-25 02:40:15 +03:00
|
|
|
wezterm-font = { path = "../wezterm-font" }
|
|
|
|
wezterm-gui-subcommands = { path = "../wezterm-gui-subcommands" }
|
2020-12-30 02:58:39 +03:00
|
|
|
wezterm-mux-server-impl = { path = "../wezterm-mux-server-impl" }
|
2021-03-28 03:49:30 +03:00
|
|
|
wezterm-ssh = { path = "../wezterm-ssh" }
|
2020-10-25 02:40:15 +03:00
|
|
|
wezterm-term = { path = "../term", features=["use_serde"] }
|
2020-12-13 11:17:10 +03:00
|
|
|
wezterm-toast-notification = { path = "../wezterm-toast-notification" }
|
2021-05-09 01:20:23 +03:00
|
|
|
window = { path = "../window" }
|
lua: add wezterm.window.screens()
Currently implemented on X11 only, this function returns information
about the geometry of the screen(s).
This is taken from the same source of information we use for the
`--position` CLI argument to `wezterm start`.
```
> wezterm.window.screens()
{
"by_name": {
"DisplayPort-1": {
"height": 2160,
"name": "DisplayPort-1",
"width": 3840,
"x": 0,
"y": 0,
},
},
"main": {
"height": 2160,
"name": "DisplayPort-1",
"width": 3840,
"x": 0,
"y": 0,
},
"origin_x": 0,
"origin_y": 0,
"virtual_height": 2160,
"virtual_width": 3840,
}
```
2022-07-06 18:32:13 +03:00
|
|
|
window-funcs = { path = "../lua-api-crates/window-funcs" }
|
2020-10-25 02:40:15 +03:00
|
|
|
|
|
|
|
[target."cfg(windows)".dependencies]
|
|
|
|
shared_library = "0.1"
|
2021-12-20 18:15:56 +03:00
|
|
|
uds_windows = "1.0"
|
2020-10-25 02:40:15 +03:00
|
|
|
winapi = { version = "0.3", features = [
|
|
|
|
"winuser",
|
|
|
|
"consoleapi",
|
|
|
|
"handleapi",
|
|
|
|
"fileapi",
|
|
|
|
"namedpipeapi",
|
|
|
|
"synchapi",
|
|
|
|
"winsock2",
|
|
|
|
]}
|
2022-03-07 03:01:59 +03:00
|
|
|
windows = { version="0.33.0", features = [
|
|
|
|
"Win32_UI_Shell",
|
|
|
|
]}
|
2020-10-25 02:40:15 +03:00
|
|
|
|
2021-02-22 20:19:05 +03:00
|
|
|
[dev-dependencies]
|
2021-03-25 20:32:31 +03:00
|
|
|
k9 = "0.11.0"
|
2022-04-07 18:22:46 +03:00
|
|
|
env_logger = "0.9"
|
2021-04-28 07:48:15 +03:00
|
|
|
benchmarking = "0.4"
|