Coder Social home page Coder Social logo

bourgeoisbear / rasterm Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 5.0 258 KB

encode images to iTerm / Kitty / SIXEL (terminal) inline graphics protocols

License: MIT License

Go 100.00%
kitty-terminal kitty iterm2 sixel sixel-graphics wezterm rlogin xterm raster encoder golang

rasterm's Introduction

rasterm

Encodes images to iTerm / Kitty / SIXEL (terminal) inline graphics protocols.

GoDoc

rasterm sample output

Supported Image Encodings

  • Kitty
  • iTerm2 / WezTerm
  • Sixel

TODO

TESTING

Notes

terminal features matrix

terminal sixel iTerm2 format kitty format
iterm2 Y Y
kitty Y
mintty Y Y
mlterm Y Y
putty
rlogin Y Y
wezterm Y Y
xterm Y

known responses

CSI 0 c

terminal response
apple terminal \x1b[?1;2c
guake \x1b[?65;1;9c
iterm2 \x1b[?62;4c
kitty \x1b[?62;c
mintty \x1b[?64;1;2;4;6;9;15;21;22;28;29c
mlterm \x1b[?63;1;2;3;4;7;29c
putty \x1b[?6c
rlogin \x1b[?65;1;2;3;4;6;7;8;9;15;18;21;22;29;39;42;44c
st \x1b[?6c
terminology \x1b[?64;1;9;15;18;21;22c
vimterm \x1b[?1;2c
wez \x1b[?65;4;6;18;22c
xfce \x1b[?65;1;9c
xterm \x1b[?63;1;2;4;6;9;15;22c

CSI > 0 c

terminal response
apple terminal \x1b[>1;95;0c
guake \x1b[>65;5402;1c
iterm2 \x1b[>0;95;0c
kitty \x1b[>1;4000;19c
mintty \x1b[>77;30104;0c
mlterm \x1b[>24;279;0c
putty \x1b[>0;136;0c
rlogin \x1b[>65;331;0c
st NO RESPONSE
vimterm \x1b[>0;100;0c
wez \x1b[>0;0;0c
xfce \x1b[>65;5402;1c
xterm \x1b[>19;344;0c

identifications

terminal values
apple terminal TERM_PROGRAM="Apple_Terminal"
apple terminal __CFBundleIdentifier="com.apple.Terminal"
guake
iterm2 LC_TERMINAL="iTerm2"
kitty TERM="xterm-kitty"
mintty TERM="mintty"
mlterm
putty
rlogin
st
terminology TERM_PROGRAM=terminology
vimterm VIM_TERMINAL is set
wez TERM_PROGRAM="wezterm"
xfce
xterm

opinions

  • Sixel is a primitive and wasteful format. Most sixel terminals also support the iTerm2 format--fewer bytes, full color instead of paletted, and no pixel re-processing required. Much better!

go stuff

go tool pprof -http=:8080 ./name.prof
godoc -http=:8099 -goroot="$HOME/go"
go test -v
go mod tidy
https://blog.golang.org/pprof

more reading

rasterm's People

Contributors

bourgeoisbear avatar chuhlomin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rasterm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.