Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the difference between this recipe and `impbcopy image.png`? Is it just for the pixelated effect?


I use: https://pypi.org/project/imgcat/

The VS Code terminal supports both the sixel and iterm image format so you get the actual image.

Most of the time I'm using it with my personal CLI graph template language:

  cat some.csv | plt '[x, y], z { bar 10px [solid red, solid green] }' | imgc
So then I see the graph in the console and then I'm ready to save it if I'm happy with the output.

If you're curious, here's plt, powered by python and matplotlib under the hood: https://github.com/williamcotton/dotfiles/blob/master/bin/pl...


Strangely this doesn't work inside tmux...

It really seems like there are a lot of issues with rendering images in the cli. I know kitty has a python version too but kitty doesn't play nice with tmux and the dev isn't a fan of tmux[0]. To be fair, I'd love to move away from tmux but I use remote machines all day and I haven't found a good alternative. I don't care about tiling (I can do that in vim, even the terminal), though it is useful (mostly switching sessions for managing workflow context). I'd also love to see someone pick back up mosh (ssh).

A critical problem is that if you work on remote machines a lot you probably gotta be able to build some things from source and build into your local bin because you don't have sudo access on the machine. Preferably installs without network access.

[0] https://github.com/kovidgoyal/kitty/issues/391


It's not really that strange that tmux doesn't support sixels. It's quite a bit more complicated and resource-intensive than ANSI Escape Codes or ncurses.

It might be fine for local[1] multiplexing but over the network it is not as fast as even something like VNC or RDP.

[1] https://github.com/csdvrx/sixel-tmux/


On macOS iterm2 has really nice integration with tmux[1] via tmux's "Control Mode". It allows you to use tmux almost transparently including image printing, mapping windows/split panes into tabs/native splits.

[1] https://iterm2.com/documentation-one-page.html#documentation...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: