1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 06:12:16 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Go to file
Wez Furlong 16e7457049 x11: notice dynamic changes to Xft.dpi
This commit allows the x11 window implementation to detect changes
in the DPI that occur after a window is created.

These can occur when changing desktop resolution or when changing
the accessibility option for "Large Text" in gnome.

In order to avoid continually polling for the value on every resize,
we look for the `_GTK_EDGE_CONSTRAINTS` atom in our property change
notifications.  This seems to be sent at least as often as the
dpi/scaling changes.

It's also worth noting that some dpi changes don't generate resize
events, so we can't just read the dpi value on every resize, because
we'd miss some of those changes.

Part of this commit changes the font scaling logic: previously
we'd keep a notion of "dpi scale" to apply.  That dates from an
earlier time in wezterm where we didn't think that we knew an
actual dpi value.

The way that worked was that we'd compare our current guestimate
of the DPI against what we though the baseline OS dpi should be to
produce a scaling factor.

On X11 that dpi value is global and we'd effectively always produce
a revised scaling factor of 1 after we'd set up the initial window.

This commit changes that logic to just pass down the actual DPI value
to the font code.  That DPI value already accounts for HiDPI scaling
so this is hopefully a NOP change for the other systems.

refs: https://github.com/wez/wezterm/issues/667
2021-04-09 09:23:25 -07:00
.cargo build static on windows for static openssl linkage 2020-02-02 13:03:07 -08:00
.github ci: fixup cirrus exclusion 2021-03-28 20:39:49 -07:00
assets Bundle PowerlineExtraSymbols as a fallback font 2021-03-06 19:12:35 -08:00
async_ossl Raise minimum Rust version to 1.51, de-vendor openssl on unix 2021-03-25 09:43:50 -07:00
base91 dyn everywhere 2019-06-08 21:28:11 -07:00
bintree bintree: clippy lint 2021-03-26 09:01:54 -07:00
ci docs: explicitly fetch nightly info 2021-04-05 12:29:13 -07:00
codec add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
config fonts: use ParsedFont rather than FontDataHandle 2021-04-08 17:11:23 -07:00
deps Allow matching font weight and font width in wezterm.font 2021-04-08 15:42:53 -07:00
docs ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
env-bootstrap use $WEZTERM_LOG to configure log levels ad-hoc 2020-12-23 12:19:19 -08:00
filedescriptor fixup build on windows, and update tests 2021-03-27 20:40:40 -07:00
licenses macOS: bundle and use MetalANGLE to enable Metal rendering 2020-10-17 09:34:01 -07:00
luahelper lint: fix some clippy stuff 2021-03-25 10:05:34 -07:00
mux ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
promise deps: misc updates 2020-12-29 09:24:34 -08:00
pty pty: unconditionally export some unix+ssh specific things 2021-03-27 07:25:00 -07:00
rangeset rangeset: clippy 2021-03-26 11:57:13 -07:00
ratelim move ratelim to its own crate 2020-10-03 11:15:57 -07:00
strip-ansi-escapes move strip-ansi-escapes into its own crate 2020-10-03 11:15:57 -07:00
tabout avoid excess capacity when dealing with iterm2 image protocol 2021-03-13 08:10:48 -08:00
term parse and respond to XTSMGRAPHICS queries 2021-04-01 22:42:28 -07:00
termwiz termwiz: do not use terminfo for unsupported 256-colors 2021-04-09 08:04:55 -07:00
test-data Render custom block glyphs 2021-02-28 09:43:26 -08:00
tmux-cc tmux: attach control mode parser to terminal 2020-11-20 09:24:50 -08:00
umask Take care to restore the original umask 2021-01-07 09:20:13 -08:00
vtparse vtparse: simplify TRANSITIONS const 2021-04-09 08:00:29 -07:00
wezterm add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-client ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
wezterm-font x11: notice dynamic changes to Xft.dpi 2021-04-09 09:23:25 -07:00
wezterm-gui x11: notice dynamic changes to Xft.dpi 2021-04-09 09:23:25 -07:00
wezterm-gui-subcommands wezterm-gui: add wezterm ssh -oIdentityFile=/some/thing 2021-03-28 08:24:35 -07:00
wezterm-input-types windows: implement decoration setting, change to bitfield 2021-03-04 09:40:38 -08:00
wezterm-mux-server wezterm-mux-server: keep running after all panes are gone 2021-04-03 15:00:08 -07:00
wezterm-mux-server-impl add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-ssh ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
wezterm-toast-notification toast: hook up action/event handling on Windows 2021-03-14 15:23:42 -07:00
window x11: notice dynamic changes to Xft.dpi 2021-04-09 09:23:25 -07:00
.cirrus.yml ci: tweak freebsd ci for getdeps rust version check 2021-03-28 20:37:09 -07:00
.gitignore docs: for the new status bar feature 2021-03-10 19:29:17 -08:00
.gitmodules repoint to my freetype mirror 2021-02-03 21:56:30 -08:00
.rustfmt.toml Make rustfmt happy about "async move" 2020-01-20 13:58:21 -08:00
Cargo.lock Allow matching font weight and font width in wezterm.font 2021-04-08 15:42:53 -07:00
Cargo.toml ssh2: on windows, link against openssl 2021-03-26 10:00:43 -07:00
CONTRIBUTING.md Add get-deps script for installing dependencies 2018-02-25 09:24:56 -08:00
get-deps move sudo into script to not use sudo for rust checking 2021-04-02 22:36:27 -07:00
LICENSE.md wezterm: bundle JetBrains Mono and Noto Color Emoji fonts 2020-09-29 22:05:18 -07:00
README.md update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
wt-record fixup wt-record on darwin 2021-03-20 20:14:17 -07:00
wt-replay update record/play scripts for macos 2019-03-22 20:41:50 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation.html

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

The GitHub Discussions and Element/Gitter rooms are better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.