Hi folks,

in my mind, Terminology tries to push the boundaries of what's possible
with terminal emulators forward. For instance, it has support for embedding
videos and images through custom escape sequences. It obviously expects
programs will make use of the new Terminology features.

It just occurred to me that programas could cooperate with Terminology to
make their own custom tiling. For instance, Emacs has the eshell mode where
Emacs acts as its own terminal emulator taking care of interpreting ANSI
escape sequences and tiling the embedded terminal in its own window all by
itself.

What if Terminology exposed an env var such as
TERMINOLOGY_SOCK=$XDG_RUNTIME_DIR/sock-1234.sock with a path for a UNIX
socket so the program (such as Emacs) could open it to cooperate with
Terminology? Emacs could open a new pty, spawn the embedded shell, and send
a fd to the master end of the new pty back to Terminology. The message
should include the position in the screen for the new embedded terminal.
Now Terminology would only read from the master end so it can draw the
contents of the embedded terminal appropriately in the new tile of the
terminal window. Emacs would still get all the input as usual and only send
input to the new terminal as it pleases (by writing in the master end of
the pty).

So, Terminology already decodes ANSI escape sequences and performs tiling
of terminal windows. The idea is to let applications reuse this
implementation to allow further embedding other interactive programs in
their own windows.

Thoughts?


-- 
Vinícius dos Santos Oliveira
https://vinipsmaker.github.io/

_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to