-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure terminal to change behaviour on calling executable... #216
Comments
Let me make sure I understand what you're suggesting. So, when you run Termonad, initially That would be really neat. One problem is that Termonad is just using VTE for the actual terminal emulator, so VTE may not expose all the functionality that would be needed to implement this. Here's the code in Termonad related to VTE: It is mostly driven by this function: Lines 428 to 485 in e47d4b2
Here's the Haddocks for the VTE-related functionality: https://hackage.haskell.org/package/gi-vte-2.91.29/docs/GI-Vte-Objects-Terminal.html VTE / Termonad definitely has knowledge of the shell you run initially (
If I remember off the top of my head, there is some functionality in VTE to pick up on the ANSI escape sequences to set window titles, but I don't quite remember how that works without digging into the code, or if you'd be able to hook into that functionality. |
It would be nice to change behaviour when a different executable is called:
xterm-256color
(like Vim, or CLI output colorizer), switch TERMINFO toxterm-256color
or better./dev/ttyUSB*
), limit TERMINFO to barebones.Many of the shells and commands simply set terminal name using special characters, so one could add a hook
that recognizes the name by a regex.
That would be a hook from
Name -> ... -> IO Terminal
.Some other shells use a command sequence to find terminal name, we could try to react to this detection, and leave it to the user to choose TERMINFO and switch it.
Related to #215
The text was updated successfully, but these errors were encountered: