mirror of
https://github.com/wez/wezterm.git
synced 2024-12-27 15:37:29 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
ba5d50ba9e
This is to support <https://github.com/wez/wezterm/issues/291>. The window resized event happens asynchronously wrt. processing a window resize, triggering at the end of the normal window resize handling. This commit introduces the notion of whether we are in full screen mode or not in the underlying event callback, which is useful to gate the desired feature, which is: when in full screen mode, increase the padding for the window to center its content. While poking around at this, I noticed that we weren't passing the per-window config down to the code that computes the quad locations for the window. This commit also changes the font size increase/decrease behavior so that in full screen mode it doesn't try to resize the window. ```lua local wezterm = require 'wezterm'; wezterm.on("window-resized", function(window, pane) local window_dims = window:get_dimensions(); local pane_dims = pane:get_dimensions(); local overrides = window:get_config_overrides() or {} if not window_dims.is_full_screen then if not overrides.window_padding then -- not changing anything return; end overrides.window_padding = nil; else -- Use only the middle 33% local third = math.floor(window_dims.pixel_width / 3) local new_padding = { left = third, right = third, top = 0, bottom = 0 }; if overrides.window_padding and new_padding.left == overrides.window_padding.left then -- padding is same, avoid triggering further changes return end overrides.window_padding = new_padding end window:set_config_overrides(overrides) end); return { } ``` |
||
---|---|---|
.cargo | ||
.github | ||
assets | ||
async_ossl | ||
base91 | ||
bintree | ||
ci | ||
codec | ||
config | ||
deps | ||
docs | ||
env-bootstrap | ||
filedescriptor | ||
licenses | ||
luahelper | ||
mux | ||
promise | ||
pty | ||
rangeset | ||
ratelim | ||
strip-ansi-escapes | ||
tabout | ||
term | ||
termwiz | ||
test-data | ||
tmux-cc | ||
umask | ||
vtparse | ||
wezterm | ||
wezterm-client | ||
wezterm-font | ||
wezterm-gui | ||
wezterm-gui-subcommands | ||
wezterm-input-types | ||
wezterm-mux-server | ||
wezterm-mux-server-impl | ||
wezterm-toast-notification | ||
window | ||
.cirrus.yml | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
get-deps | ||
LICENSE.md | ||
README.md | ||
wt-record | ||
wt-replay |
Wez's Terminal
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 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:
- You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one: https://github.com/wez/wezterm/issues
- Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
- There is a Matrix room via Element.io for (potentially!) real time discussions.
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.