这是indexloc提供的服务,不要输入任何密码
Skip to content

[Feature]: Indicate stty size While Resizing #4845

@GfEW

Description

@GfEW

Feature description

The Problem

First off, it's awesome pinch-zooming works so well in termux. Adjusting the font size also allows to quickly adjust the terminal size to specific needs.

Unfortunately, as of v0.118.3, you can't easily recognize the actual size you're adjusting the terminal to.

Suggested Solution

During pinch-zooming and then sticking for two seconds or so, display a small geometry indicator on top of the current terminal.

Additional information

  • Some xterms display the actual terminal size (usually rows x cols because it's a terminal; there may be a few that show cols x rows instead) when the window size is changed.
  • The best workaround in termux v.0.118.3 that I know is frequently running stty size while resizing, or even watch stty size. However, doing so requires you
    • to empty the command line (unless you haven't hit the sessions limit yet and can start a new session for that purpose),
    • then to type in that stty command every time (or setting up a readline binding to do so).
  • Otherwise, starting the actual program that requires a certain line or column count would frequently just tell "nope, that's too few", or you'll be using smaller font than necessary because the terminal has ended up larger than required. Note that not every CLI/TUI program handles SIGWINCH properly, so you'd have to quit the program, pinch-zoom, then test again. All in all, that procedure would be even more tedious than the workaround above.

EDIT 20251102:

Cleaned up duplications due to FR template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions