atanunq / viuer

Rust library for displaying images in the terminal.
MIT License
253 stars 46 forks source link

Better detection of OSC 1337 support #26

Closed kidonng closed 3 years ago

kidonng commented 3 years ago

Currently viuer dumbly checks iTerm in TERM_PROGRAM. However there are a handful of terminal emulators that support the OSC 1337 escape codes, i.e. iTerm2's image protocols:

There should be a better method of checking support of the protocol.

A workaround is just to fake iTerm to viuer.

atanunq commented 3 years ago

The list is really helpful, thank you! I am struggling to find information about SwiftTerm and MacTerm, though. Do they set either $TERM or $TERM_PROGRAM?

Mlterm & hterm look pretty niche to me, I'd rather not include them unless specifically requested.

atanunq commented 3 years ago

Added the first two in https://github.com/atanunq/viuer/commit/42cd38c61b8ab007922f559056d10ee69a86f737