PaperTTY icon indicating copy to clipboard operation
PaperTTY copied to clipboard

Feature(?) Draw images when using the terminal

Open waynew opened this issue 3 years ago • 4 comments

Basic idea: With a regular TFT screen, you can be using the terminal, and then use fbi to view images on the TFT. If you quit, then it sends you back to the terminal.

I'm not sure if there's a way to do that with the existing codebase. I didn't find anything, and it appears that trying to write to the SPI/launch a second papertty process to draw an image just fails because the device is busy.

One imaginary approach is that the papertty process has some way of providing information, whether that's using inotify, or sending information via a port, or ???

I'm not sure exactly what process things currently use, but it would be really neat if that were a possibility.

waynew avatar Nov 10 '20 22:11 waynew

I've considered having some sort of control socket for interacting with the thing while it's running, which should make this pretty easy to do, but that hasn't been implemented yet. Might make sense to make it a bit more daemony overall to have more flexibility to do stuff like this.

joukos avatar Nov 11 '20 08:11 joukos

One way to approach this is to stop the terminal service, show the image, and then start the terminal service again.

cat view_img.sh #!/bin/sh sudo systemctl stop papertty cat foo.png | sudo papertty --driver EPD4in2 image read press_enter sudo systemctl start papertty

But it would be way more cool to be able to see images in-line with text in the terminal...

a8ksh4 avatar Apr 26 '21 22:04 a8ksh4

This could be done with a framebuffer mode, in which papertty basically acts like a fbcp, read the fb0 and render just like how it does with vnc.

hym3242 avatar Jan 16 '22 06:01 hym3242

@hym3242, I actually added (a very preliminary version of) such a mode now https://github.com/joukos/PaperTTY/pull/86, been pending for a long time...

joukos avatar Jan 17 '22 12:01 joukos