Re: [E-devel] [Terminology] Cooperative tiling between Terminology and hosted programs

2023-02-02 Thread Vinícius dos Santos Oliveira
Em qui., 2 de fev. de 2023 às 18:45, Boris Faure  escreveu:

> There's no escape codes to handle the tiling, since those
> could also be used to DDOS terminology, but that's something could be
> thought about.
>

If we go this route, I don't think it should be done through escape codes.
That's why I suggested separate UNIX sockets.

One ptty per tile (as it's already done anyway). Just expose the same (and
not a different one) feature to the user.

However I'm glad you're not against the feature. Unfortunately I'm busy
right now so I can't hack into Terminology to iterate some PoCs.


-- 
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


Re: [E-devel] [Terminology] Cooperative tiling between Terminology and hosted programs

2023-02-02 Thread Boris Faure
On 23-01-29 05:53, Vinícius dos Santos Oliveira wrote:
> 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?

That's some interesting thoughts.  Terminology already has some custom
escape codes.  I would go that way to have interaction with an external
program.  There's no escape codes to handle the tiling, since those
could also be used to DDOS terminology, but that's something could be
thought about.
-- 
Boris Faure
Pointer Arithmetician


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