Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(signals): support XTWINOPS 14 and 16 (and query the terminal for them on startup and SIGWINCH) #1316

Merged
merged 6 commits into from
Apr 12, 2022

Conversation

imsnif
Copy link
Member

@imsnif imsnif commented Apr 12, 2022

This PR is part of the ongoing effort to support Sixel graphics inside Zellij.

It adds:

  1. On startup and on SIGWINCH, Zellij queries the terminal for the text area size in pixels (CSI 14t) as well as the character cell size in pixels (CSI 16t).
  2. Zellij uses these in order to calculate its internal cursor height/width ratio (up until now this was a static ratio which will still be the default for terminals not supporting these signals)*.
  3. Zellij will also now support terminal panes querying for this info themselves (adjusted to the text area of the pane of course). The upshot here is that terminal panes will actually get a better experience than if running outside Zellij, seeing as Zellij will support both CSI 14t and CSI 16t even if the terminal it runs inside supports only one (since one can be derived from the other).

*This has a minor user facing effect when opening a new pane non-directionally (alt-n or ctrl-p + n). The place for the pane will now be more accurately calculated to reflect the largest free space on screen.

@imsnif imsnif temporarily deployed to cachix April 12, 2022 14:28 Inactive
@imsnif imsnif temporarily deployed to cachix April 12, 2022 14:28 Inactive
@imsnif imsnif temporarily deployed to cachix April 12, 2022 14:29 Inactive
@imsnif imsnif temporarily deployed to cachix April 12, 2022 14:29 Inactive
@imsnif imsnif temporarily deployed to cachix April 12, 2022 14:54 Inactive
@imsnif imsnif temporarily deployed to cachix April 12, 2022 15:33 Inactive
@imsnif imsnif merged commit 19adb29 into main Apr 12, 2022
@imsnif imsnif mentioned this pull request Apr 12, 2022
@har7an har7an deleted the new-signals branch October 23, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant