summary refs log tree commit diff
path: root/term.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-02 18:39:08 -0500
committerC. McEnroe2020-02-02 18:40:21 -0500
commit8ec17d4f8ce2edab30d998d6b279f0e5cd840022 (patch)
treefe6824bfb005f1826f04fcb06988207ef2e733ee /term.c
parenta507ff40732b1f6fe9c5dbc1f1f17ef00bcccf5d (diff)
Use tsl/fsl capabilities for title if available
Also manually fill them if TERM=xterm* because they really should be
there.
Diffstat (limited to 'term.c')
-rw-r--r--term.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/term.c b/term.c
index bf4a933..427cac6 100644
--- a/term.c
+++ b/term.c
@@ -17,19 +17,11 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <termios.h>
 #include <unistd.h>
 
 #include "chat.h"
 
-static bool xterm;
-
-void termInit(void) {
-	const char *term = getenv("TERM");
-	xterm = (term && !strncmp(term, "xterm", 5));
-}
-
 void termNoFlow(void) {
 	struct termios attr;
 	int error = tcgetattr(STDIN_FILENO, &attr);
@@ -39,12 +31,6 @@ void termNoFlow(void) {
 	tcsetattr(STDIN_FILENO, TCSANOW, &attr);
 }
 
-void termTitle(const char *title) {
-	if (!xterm) return;
-	printf("\33]0;%s\33\\", title);
-	fflush(stdout);
-}
-
 static void privateMode(const char *mode, bool set) {
 	printf("\33[?%s%c", mode, (set ? 'h' : 'l'));
 	fflush(stdout);