-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
compatibilityCompatibility (e.g. terminal quirks)Compatibility (e.g. terminal quirks)
Description
Summary
chafa 1.18.0 auto-detects sixel support when running inside tmux (Konsole terminal). At larger terminal widths, the sixel output silently fails to render — the image is completely invisible. At smaller terminal widths, the same image renders correctly.
Environment
- chafa 1.18.0 (Arch Linux)
- tmux 3.5a
- Konsole (KDE terminal emulator)
TERM=xterm-256color,COLORTERM=truecolor
Reproduction
# Generate test image
magick -size 400x300 gradient:red-blue /tmp/test.png
# Inside tmux in Konsole (window ~70 columns wide):
chafa --size 70 /tmp/test.png # ✅ Renders correctly
chafa --size 200 /tmp/test.png # ❌ Image invisible — nothing displayed
# Force symbols mode — works at ALL sizes:
chafa -f symbols --size 200 /tmp/test.png # ✅ Always works
# Force sixels explicitly — fails at large size:
chafa -f sixels --size 200 /tmp/test.png # ❌ Fails same as auto-detectObserved behavior
--size |
Auto-detected format | Output bytes | Renders? |
|---|---|---|---|
| 40 | sixel | 42,790 | ✅ Yes |
| 70 | sixel | 199,139 | ✅ Yes |
| 100 | sixel | 403,894 | ✅ Yes |
| 130 | sixel | 675,674 | |
| 160 | sixel | 1,021,665 | ❌ No |
| 200 | sixel | 1,442,439 | ❌ No |
Confirmed via hexdump that chafa outputs DCS sixel sequences (ESC P 0;1;0q...) even without -f sixels — it auto-selects sixel when the terminal reports sixel support.
All sizes work correctly with -f symbols.
Impact on downstream consumers
Applications that shell out to chafa and pipe its stdout (or use stdio: inherit) assume chafa outputs ANSI-colored Unicode half-blocks. The undocumented switch to sixel format breaks these consumers because:
- The output format is different (DCS sequences vs ANSI + Unicode)
- Sixel output requires tmux DCS passthrough wrapping that consumers don't know to apply
- There's no way to detect which format chafa chose without parsing the output
Our workaround is to force -f symbols when invoking chafa.
Related issues
- Sixel and tmux passthrough over ssh not rendering jpegs, ignoring sizes, and other chaos #217 — Sixel and tmux passthrough over ssh not rendering (similar symptoms)
- [Feature Request] Improved support for FZF and tmux #218 — Improved support for FZF and tmux
- Sixel capability not detected in foot + tmux #228 — Sixel capability not detected in foot + tmux (pixelated output)
Expected behavior
Either:
- chafa should not auto-select sixel format in tmux when large payloads will fail to render, OR
- The auto-detected format should be documented/queryable so consumers can handle it, OR
- chafa should handle tmux DCS passthrough wrapping internally when it detects tmux (similar to how
viudoes)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compatibilityCompatibility (e.g. terminal quirks)Compatibility (e.g. terminal quirks)