aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 18:52:44 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 18:52:44 +0000
commit8873c79cbcaf799ca4b371faf24564664aedc850 (patch)
treea941bb5223a9c43e10c6aaf098b4154f3b7272e6 /tty.c
parentf9dedfcccac39efbf4d6aee8a24259ca3470f9af (diff)
downloadrtmux-8873c79cbcaf799ca4b371faf24564664aedc850.tar.gz
rtmux-8873c79cbcaf799ca4b371faf24564664aedc850.tar.bz2
rtmux-8873c79cbcaf799ca4b371faf24564664aedc850.zip
Set window title to current session. New options set-titles to disable.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index 944ad8fa..89df5f33 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.23 2008-06-10 18:51:22 nicm Exp $ */
+/* $Id: tty.c,v 1.24 2008-06-18 18:52:44 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -343,6 +343,14 @@ tty_putc(struct tty *tty, char ch)
}
void
+tty_set_title(struct tty *tty, const char *title)
+{
+ tty_puts(tty, "\e]0;");
+ tty_puts(tty, title);
+ tty_putc(tty, '\007');
+}
+
+void
tty_vwrite(struct tty *tty, struct screen *s, int cmd, va_list ap)
{
char ch;
@@ -544,8 +552,6 @@ tty_vwrite(struct tty *tty, struct screen *s, int cmd, va_list ap)
if (key_mouse != NULL)
tty_puts(tty, "\e[?1000h");
break;
- case TTY_TITLE:
- break;
case TTY_ATTRIBUTES:
ua = va_arg(ap, u_int);
ub = va_arg(ap, u_int);