ptyfwd: optionally update window title if we are running a ptyfwd session

This commit is contained in:
Lennart Poettering
2024-02-09 18:27:01 +01:00
parent d0aa368c85
commit ddba81d8dd
3 changed files with 66 additions and 10 deletions
+4
View File
@@ -89,6 +89,10 @@
/* Set cursor to top left corner and clear screen */
#define ANSI_HOME_CLEAR "\x1B[H\x1B[2J"
/* Push/pop a window title off the stack of window titles */
#define ANSI_WINDOW_TITLE_PUSH "\x1b[22;2t"
#define ANSI_WINDOW_TITLE_POP "\x1b[23;2t"
bool isatty_safe(int fd);
int reset_terminal_fd(int fd, bool switch_to_text);