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

output.py: support title setting via curses/terminfo #1343

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jun 14, 2024

  1. output.py: try to use curses for setting xterm title

    Currently only the list of hard coded terminal names found in
    _legal_terms_re allow usage of the title setting feature. Maintaining
    this list is a burden and means that some terminals will miss out this
    feature, although they actually do have support for it.
    
    Thus, try to use the curses module to dynamically query the terminfo
    database for "tsl" (to status line) and "fsl" (from status line)
    strings. This way all terminals that declare support for the feature
    will automatically benefit.
    
    As a fallback, should curses not be available, still rely on the
    _legal_terms_re for setting up terminal titles.
    
    Signed-off-by: Matthias Gerstner <[email protected]>
    gerstner-hub committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    55bea1c View commit details
    Browse the repository at this point in the history
  2. output.py: harmonize variable names and group xterm title code

    The global variables are inconsistently named and spread over the
    module, similarly the title related code is not grouped together.
    Harmonize this.
    
    Also the double negative logic involving `_disable_xtermTitle` makes the
    code harder to read. Invert the logic.
    
    Signed-off-by: Matthias Gerstner <[email protected]>
    gerstner-hub committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    931c4d0 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. output.py: consistently use sys.__stderr__

    sys.stderr is sometimes temporarily replaced by other objects, thus rely
    on sys.__stdserr__ consistently. Also provide a default for `fd` in
    `init_curses()`.
    gerstner-hub committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    8d698e0 View commit details
    Browse the repository at this point in the history