1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 22:33:52 +03:00
Commit Graph

7353 Commits

Author SHA1 Message Date
Wez Furlong
06dd8e4a79
macos: populate effective_dpi in wezterm.gui.screens
refs: #4096
2023-08-06 10:11:05 -07:00
Wez Furlong
1bbd56d469
wayland: return effective_dpi in wezterm.gui.screens
Note that this also does not respect dpi_by_screen; this is for
consistency in behavior and reported values.

Once we can produce the correct overridden value in
dispatch_pending_event, we can update these functions to return
the same data.

refs: #4096
2023-08-06 09:31:11 -07:00
Wez Furlong
06046c4319
x11: return effective_dpi in wezterm.gui.screens
refs: #4096
2023-08-06 09:26:06 -07:00
Wez Furlong
2a7167a0ef
fix some warnings 2023-08-06 09:18:40 -07:00
Wez Furlong
6ccbc723ba
wezterm.gui.screens: add optional effective_dpi field
This commit implements it for Windows. The other systems
report None for now.
2023-08-06 09:18:40 -07:00
Wez Furlong
18d93fce5a
gui: remove config.dpi override logic
The overrides are now applied at the window layer, which is (mostly!)
aware of per-screen overrides.

refs: #4096
2023-08-06 08:45:14 -07:00
Wez Furlong
b11691dda7
windows: support dpi_by_screen option
refs: #4096
2023-08-06 08:43:33 -07:00
Wez Furlong
ef94fc8405
wayland: respond to config.dpi changes faster
This is a baby step towards handling dpi_by_screen.
I don't want to do the actualy per-screen stuff here;
it touches stuff around the edges of SCTK and there is a pending,
significant, rewrite of that code needed to upgrade to a more
recent version of SCTK + wayland-protocols, and I don't want to waste
my effort on the intermediate state.
https://github.com/wez/wezterm/issues/3996#issuecomment-1636830740

refs: #4096
2023-08-06 07:52:37 -07:00
Wez Furlong
ede7e846f4
x11: respect config.dpi_by_screen
Maintain a cache of the positions of the various named screens,
and use that to resolve the screen of the current window, and
from there we can resolve the correct dpi_by_screen screen.

Make dpi and dpi_by_screen config changes generate a resize
event with the updated dpi.

refs: #4096
2023-08-05 22:25:06 -07:00
Wez Furlong
f7f253ec28
macos: add config.dpi_by_screen config option
Allows specifying the precise dpi to use on a per-screen basis:

```lua
return {
  dpi_by_screen = {
    ["Built-in Retina Display"] = 144,
  },
}
```

The screen names are the same as those returned from
`wezterm.gui.screens()`.

Changing either `dpi` or `dpi_by_screen` in the config will now cause
the window to be immediately resized/adjusted to the changed dpi
override.

Ultimately, I'd like to deprecate `dpi` in favor of `dpi_by_screen`,
but can't do that until this functionality is ported to windows, x11
and wayland.

refs: #4096
2023-08-05 20:48:59 -07:00
Wez Furlong
085e8da478
macos: fonts: use alternative fallback approach
The approach we were using previously was to ask macOS for the fallback
font list, but it didn't include the correct fonts for certain
codepoints.

Switch to using an alternative API that asks macOS which font to use for
a specific codepoint.

refs: #4099
2023-08-05 18:15:08 -07:00
Wez Furlong
33187d0e79
macos: fonts: use full list of user fallback languages
The hope was that this would find more fonts, but it doesn't actually
help for this case.

refs: https://github.com/wez/wezterm/issues/4099
2023-08-05 17:33:59 -07:00
Wez Furlong
a7c6ea8c1e
deps: harfbuzz -> 8.1.1
Second attempt to get on 8.1, tests seem good!

refs: https://github.com/harfbuzz/harfbuzz/issues/4358
2023-08-02 19:06:52 -07:00
xqrdot
419210bc14 corrected front_end.md 2023-08-02 07:15:27 -07:00
Daniel Vainsencher
6238da2f1b Support [https://pop.system76.com/](POP!_OS) in get-deps
A debian variant IIUC
2023-08-02 07:14:11 -07:00
Wez Furlong
ca9cf23019
Revert "deps: harfbuzz -> 8.1.0"
This reverts commit e7bf2b4088.

The tests fail when built and run in release mode. There's
something fishy that needs investigation; will do so later.
2023-07-31 23:10:25 -07:00
Wez Furlong
e7bf2b4088
deps: harfbuzz -> 8.1.0 2023-07-31 22:32:21 -07:00
Wez Furlong
d1d4db20be
cargo update
Transitive deps now require rust 1.71, so update for that, as well
as some other minor changes required by transitive deps.
2023-07-30 20:09:15 -07:00
Ran Shaham
afb485eb47 docs: fix building without wayland command 2023-07-30 07:20:49 -07:00
Wez Furlong
3aa7da611a
fixup doc build for mkdocs 1.5 2023-07-26 16:10:42 -07:00
Wez Furlong
a07ab883af
persist charselect, repl history and others in data dir
We were using the runtime dir with a fallback to a directory
that was equivalent to the data dir on !xdg systems.  That
meant that the state in the runtime dir was often scrubbed
around a reboot.

refs: https://github.com/wez/wezterm/discussions/4019
refs: https://github.com/wez/wezterm/issues/4047
2023-07-22 10:31:03 -07:00
Wez Furlong
3e3df823e4
deps: update wgpu -> 0.17
Pick up my fix from https://github.com/gfx-rs/wgpu/pull/3924

closes: https://github.com/wez/wezterm/issues/3612
2023-07-22 08:00:59 -07:00
Malthe Larsen
94ab049637
add plugin_dir field to RepoSpec (#4017) 2023-07-17 11:16:33 -07:00
Wez Furlong
e048410491
imgcat: add resize and resample functionality
This is primarily to improve the chances of displaying an arbitrary
image without resorting to additional external tools, that may be
difficult or impossible to install.

refs: #3716
refs: #3264
2023-07-17 10:55:53 -07:00
Wez Furlong
69e610041b
sync color schemes 2023-07-16 23:13:08 -07:00
Wez Furlong
b9673249d9
cargo update 2023-07-16 20:34:39 -07:00
dependabot[bot]
c2e0395fac build(deps): bump actions/upload-pages-artifact from 1 to 2
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 1 to 2.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-16 20:34:16 -07:00
Wez Furlong
7214470073
docs: fix typo
closes: https://github.com/wez/wezterm/issues/4006
2023-07-16 12:31:27 -07:00
Wez Furlong
360247fe8d
windows: remove positional mods from termwiz overlay panes
otherwise, the termwiz line reader can become confused and
fail to recognize key presses like `(` which have SHIFT and LEFT_SHIFT
set.

refs: https://github.com/wez/wezterm/issues/3999
2023-07-16 09:45:22 -07:00
Wez Furlong
822a766761
conpty: adjust screensize probing
We need a delay, and to be able to swallow a couple of
excess xtversion responses in order to read the pixel
dimension response.
2023-07-16 08:46:45 -07:00
Wez Furlong
e2c9c60acd
termwiz: fix windows build 2023-07-16 07:02:12 -07:00
Wez Furlong
feb9e11b33
termwiz: refactor terminal probing
Factor out the probe_screen_size method from the Terminal
trait and put it into a ProbeCapabilities struct.

This makes it easier to introduce other sorts of probed
information without making the Terminal trait grow all sorts
of additional methods.

A Terminal may choose not to support probing, which it cannot
if it doesn't have Read + Write handles to an underlying terminal
(such as some special cases in wezterm).
2023-07-16 06:53:17 -07:00
Wez Furlong
abc92e56e0
Fix vim pilot error
refs: https://github.com/wez/wezterm/issues/3624
refs: https://github.com/wez/wezterm/issues/3716
2023-07-15 22:22:10 -07:00
Wez Furlong
b7771feef6
imgcat: work better with tmux and conpty
Neither of these understand image protocols, and both are
an additional processing layer between the application and
wezterm.

This commit detects and wraps OSC sequences in tmux's passthru
sequence so that the data is passed on to wezterm rather than
elided from the data stream.

For image protocols in both tmux and conpty, work a little
smarter and explicitly move the cursor position to the same
location that wezterm would move it to.  That prevents the
display from being as mangled by tmux/conpty due to a diverging
understanding of the cursor position.

The logic isn't perfect, and can result in the x-coordinate
being incorrect, and this won't work with the new --position
argument either in its current state, without adding a lot
of complexity to deal with scrolling and relative and absolute
positioning handling.

To facilitate that, a new termwiz Terminal trait method has
been added to probe the terminal name, version, cell and pixel
dimensions. It's not pretty.

refs: https://github.com/wez/wezterm/issues/3624
refs: https://github.com/wez/wezterm/issues/3716
2023-07-15 22:13:19 -07:00
Wez Furlong
2e505ad869
imgcat: add --position, --no-move-cursor and --hold options
These allow additional control over image placement

refs: https://github.com/wez/wezterm/issues/3716
2023-07-15 16:27:52 -07:00
Wez Furlong
b54b0ce404
fix old NF 2.0 symbols for shortcuts in command palette
These got overlooked because they weren't using symbolic names.
Fix that while we're in here.

refs: #3988
2023-07-14 11:08:39 -07:00
Wez Furlong
115e629ec1
fix pane:split{}
Similar issue as 31eb4fe271

refs: https://github.com/wez/wezterm/issues/3985
2023-07-13 17:44:00 -07:00
Wez Furlong
f73f718098
Revert "ci: don't use release mode for tests"
This reverts commit cc567ab464.

It didn't improve anything and seems to have broken the windows CI.
2023-07-13 08:14:19 -07:00
Wez Furlong
31eb4fe271
fix window:perform_action
Accidentally broken by 750f49f0ae

refs: https://github.com/wez/wezterm/issues/3981
2023-07-13 07:37:05 -07:00
Wez Furlong
4924fd5137
repl: improve printing of various lua types
We can now delegate to the new mlua helpers for a lot of this stuff.
We do still take first dibs on printing userdata so that we can use
our dynamic data interpretation when available, but otherwise, we
can now show reasonable information about things like builtin file
objects, and include the pointer address of things like functions
to help disambiguate them when printing them.

refs: #3849
refs: https://github.com/khvzak/mlua/issues/291
2023-07-12 14:15:08 -07:00
Wez Furlong
750f49f0ae
deps: upgrade mlua to 0.9.0-rc.1
refs: https://github.com/khvzak/mlua/issues/291
refs: #3849
2023-07-12 14:14:55 -07:00
Wez Furlong
af6134df4f
docs: fedora 35 is no longer supported 2023-07-12 12:59:37 -07:00
Wez Furlong
dfd1bb0ea4
docs: update for available linux builds
refs: https://github.com/wez/wezterm/issues/3973
2023-07-12 12:57:19 -07:00
Wez Furlong
719a513d0b
ci: add debian 12
refs: https://github.com/wez/wezterm/issues/3973
2023-07-12 12:02:47 -07:00
Wez Furlong
cc567ab464
ci: don't use release mode for tests
The original thinking was that it would be quicker to reuse
the existing release mode deps, but I'm not sure if that is
still true, so let's test it to see.

At the time of writing, the test phase takes 8-12 minutes depending
on the OS, with most of that being compilation.
2023-07-12 08:35:14 -07:00
Wez Furlong
5d1136d29b
Revert "front_end defaults to OpenGL again"
This reverts commit f4abf8fde7 so that
webgpu is the default again in nightly builds
2023-07-12 07:47:12 -07:00
Wez Furlong
35df521f76
docs: update for release 2023-07-12 07:46:13 -07:00
Wez Furlong
f4abf8fde7
front_end defaults to OpenGL again
Feels safest to do this until we can make a smoother fallback
experience for webgpu.

I will revert this after tagging the release so that nightly
runs webgpu by default.
2023-07-12 07:26:01 -07:00
Wez Furlong
28dcea0ab6
deps: harfbuzz -> 8.0.1 2023-07-12 06:37:34 -07:00
Wez Furlong
523660c192
lua: suppress userdata is not expected type error in repl
When printing built-in-to-lua userdata, avoid tripping over
an error message from mlua.

refs: https://github.com/khvzak/mlua/issues/291
refs: https://github.com/wez/wezterm/issues/3849
2023-07-11 10:27:30 -07:00