feat: inline images in terminals (iTerm2 OSC 1337)
Images sent with the iTerm2 inline protocol (imgcat and friends) are decoded (PNG, JPEG, GIF first frame) and drawn at the cursor, sized from the width/height arguments in cells, pixels or percent (aspect kept, never wider than the terminal); the cursor moves below so text continues after them. They are anchored to the same stable line index as the shell-integration marks, scroll with the text and are dropped with the scrollback or on clear. Remote data, so decoding is bounded (8192 px a side, 256 MiB allocation), OSC bodies are capped at 16 MiB, inline=0 downloads are ignored, and each terminal keeps at most 32 Mpx of images, oldest first. Sixel and kitty graphics are not implemented.
This commit is contained in:
@@ -73,6 +73,7 @@ Use Nexus Terminal when you need to:
|
||||
- Shift+PageUp/PageDown/Home/End and the mouse wheel scroll the scrollback; on the alternate screen the wheel sends arrow keys, so `tmux`, `screen` and `byobu` scroll naturally.
|
||||
- Context menu with Copy, Paste, Select All, Find, Send Snippet, Port Forwards, Split Right, Split Down, Export Output, Clear and Reset.
|
||||
- Export the whole scrollback as plain text.
|
||||
- Inline images in the iTerm2 format (`imgcat`, `wezterm imgcat`, `chafa -f iterm`…): PNG, JPEG and GIF, sized in cells, pixels or percent, scrolling with the text.
|
||||
- Shell integration (OSC 133): jump between prompts, copy the last command's output, and see each command's exit status and duration beside its prompt.
|
||||
- Status-bar latency for the active SSH session.
|
||||
|
||||
|
||||
@@ -218,6 +218,10 @@ A new pane offers **Local Machine** and your terminal profiles (SSH, Telnet and
|
||||
|
||||
## 6. Terminal actions and search
|
||||
|
||||
### Inline images
|
||||
|
||||
Programs that print images in the iTerm2 format (`imgcat`, `wezterm imgcat`, `chafa -f iterm`) show PNG, JPEG and GIF (first frame) images inline, sized as the program asks and never wider than the terminal; the text continues below the image. Images scroll with the text and are dropped with the scrollback. Very large images (over 8192 pixels a side) are ignored, and each terminal keeps at most 32 megapixels of images, dropping the oldest. Sixel and kitty graphics aren't supported.
|
||||
|
||||
### Shell integration
|
||||
|
||||
When the shell marks its prompts and commands (the OSC 133 sequences), Nexus Terminal knows where each command starts and ends:
|
||||
|
||||
Reference in New Issue
Block a user