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

Support for graphics in the terminal #4763

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

Commits on Mar 11, 2021

  1. Add Sixel support

    ayosec committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    08ceb31 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Configuration menu
    Copy the full SHA
    b4adf34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50d717f View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Configuration menu
    Copy the full SHA
    c6359f9 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

  1. Configuration menu
    Copy the full SHA
    bfd0f81 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. Configuration menu
    Copy the full SHA
    fd0218f View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2021

  1. Configuration menu
    Copy the full SHA
    e5e9c82 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2021

  1. Configuration menu
    Copy the full SHA
    b6b7840 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2021

  1. Don’t erase text behind a sixel image; the image might be transparent

    We still add a reference to the graphic in the first cell of every
    line under the image, but we don’t erase any of the text in any of the
    cells.
    db48x committed May 31, 2021
    Configuration menu
    Copy the full SHA
    9723e3f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5972714 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    89a9fc6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f4bdc6f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3caa09e View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2021

  1. support DECSET/DECRST (CSI ? Pm h) to change where the cursor ends up

    after printing a sixel image. The default is for the cursor to be
    moved to the first column of the line after the image. When we receive
    CSI ? 8452 h, we will instead leave the cursor on the last line of the
    image, on the next column past the end of the image.
    db48x committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    ae7aa4b View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2021

  1. Configuration menu
    Copy the full SHA
    699a7a9 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2021

  1. Configuration menu
    Copy the full SHA
    573dedd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d360e4 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2021

  1. Configuration menu
    Copy the full SHA
    91b8566 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2021

  1. Configuration menu
    Copy the full SHA
    18653cf View commit details
    Browse the repository at this point in the history
  2. Interprets mode 80 as Sixel Display Mode.

    This is reverse of the *sixel scrolling* option, which should match the actual
    behaviour of DEC terminals.
    
    For reference: alacritty#4763 (comment)
    ayosec committed Sep 24, 2021
    Configuration menu
    Copy the full SHA
    ebf41d5 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. Merge with alacritty/master

    The merge requires multiple changes in order to be compatible with the last
    version of Alacritty:
    
    - Textures are now always deleted on Drop.
    
      This is required because Alacritty now supports multiple windows in the same
      process, so we can't assume that all resources are freed when a single window
      is closed. This is the same approach used for the atlas textures.
    
    - The graphics feature is only compatible with OpenGL 3.3.
    
      Alacritty now supports GLES 2.2, but in order to provide a proper support for
      it we need a different approach, specific for that version.
    
    - Cell dimensions in pixels are re-added to the alacritty_terminal crate.
    ayosec committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    a919ac7 View commit details
    Browse the repository at this point in the history
  2. Fill all cells under a graphic with the template.

    With the template we can create hyperlinks attached to the graphic.
    
    To avoid reflow issues when a row is shrank, wrapped rows that only contain
    graphic cells are discarded. With this approach we loss some info, like the
    hyperlink, but the image is always properly positioned in the grid.
    ayosec committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    48b2610 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4469599 View commit details
    Browse the repository at this point in the history
  4. Allow replacing part of a graphic with text.

    When text is added to a cell with a reference to a graphic, an operation is sent
    to the OpenGL thread to replace a subregion of the cell with a transparent area.
    
    If the OpenGL driver supports the GL_ARB_clear_texture extension, the region is
    updated with glClearTexSubImage. If the extension is not available, the
    texture is updated with glTexSubImage2D.
    ayosec committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    b737176 View commit details
    Browse the repository at this point in the history
  5. Highlight graphics to show hints.

    Similar to the underline line rendered when the cursor is over an hyperlink, for
    graphics we now render a border around the graphic.
    ayosec committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    f796ba2 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Allow overlapping graphics.

    If a graphic is added over another one, the implementation now checks if new
    graphic has transparent pixels in every cell. If so, the graphic is appended to
    the cell, instead of replacing the previous one.
    
    SmallVec is used to prevent heap allocation when the cell only contains a single
    graphic. This should be the most common scenario.
    
    The GPU will store up to 100 textures. If another texture is added when there
    are 100, the oldest one is deleted.
    ayosec committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    dae81e0 View commit details
    Browse the repository at this point in the history
  2. Optimize graphics replacement.

    A simple optimization for inserting graphics is to detect when a new graphic is
    replacing completely an existing one. If both graphics have the same size, and
    the new one is opaque, we can assume that the previous graphic will not be
    displayed anymore, so it is not considered when update the graphics list in a
    single cell.
    
    This commit also adds serde implementation for GraphicsCell. This was used to
    debug the new logic.
    ayosec committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    111986f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    06b4c3c View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

  1. Fix clippy warnings.

    ayosec committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    1c6a770 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. Configuration menu
    Copy the full SHA
    e521d6e View commit details
    Browse the repository at this point in the history
  2. Changes in sixel module to be compatible with oldstable.

    - Reimplement abs_diff().
    - Use positional arguments to format the error message in assert_color!().
    ayosec committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    bf743df View commit details
    Browse the repository at this point in the history
  3. Initialize cell dimensions when create a Graphics instance.

    This fixes a bug that crashes the terminal when a graphic is added before
    resizing the window.
    ayosec committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    8d2016b View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. Configuration menu
    Copy the full SHA
    2301bf1 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. Configuration menu
    Copy the full SHA
    03cf630 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2022

  1. Merge pull request #7 from kumattau/graphics-gles2

    Support GLES2 Renderer in sixel
    ayosec committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    83aceed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2eb9812 View commit details
    Browse the repository at this point in the history
  3. Set graphics limit per cell.

    The limit per grid is increased to `1000`, and a new limit per cell is added,
    set to `20`.
    ayosec committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    396002c View commit details
    Browse the repository at this point in the history
  4. Add Eq derive to ClearSubregion.

    Suggested by clippy.
    ayosec committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    a9335fc View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2022

  1. Configuration menu
    Copy the full SHA
    615e72e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #8 from kumattau/graphics-xtsmgraphics

    CSI XTSMGRAPHICS Pi=2, Pa=1 should return dimensions that fit in text area
    ayosec committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    410b36e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    850fd41 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2f3a8cf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ed6e3fa View commit details
    Browse the repository at this point in the history
  6. Apply rustfmt to term/mod.rs.

    ayosec committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    48a388a View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. Configuration menu
    Copy the full SHA
    2772e72 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc97c07 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2023

  1. Configuration menu
    Copy the full SHA
    713c541 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2024

  1. Configuration menu
    Copy the full SHA
    5e75fc9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1b78c1 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Apply clippy suggestions.

    ayosec committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    6bd9c71 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Include Sixel support in Device Attributes response.

    The response for `\e[c` (Send Device Attributes) now returns level 2 with the
    Sixel extension.
    
    The other extensions are 6 (Selectively Erasable Characters) and 22 (Color Text).
    The values are documented in page 04-19 of DEC-STD-070.
    ayosec committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    84c0f29 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    21c9138 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    ff0f64f View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Configuration menu
    Copy the full SHA
    484e357 View commit details
    Browse the repository at this point in the history
  2. Upgrade vte fork.

    With `$ cargo update vte`.
    ayosec committed May 15, 2024
    Configuration menu
    Copy the full SHA
    39c7b40 View commit details
    Browse the repository at this point in the history