circo

claudio's IRC oasis
git clone git://git.bitsmanent.org/circo
Log | Files | Refs | README | LICENSE

commit f3c439c9d78d4264f5116af1fb4973b4adbfe013
parent 7490260a27d91a7a0eaa45fb68a362e5a4fddf4d
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Tue, 25 Jul 2017 20:31:33 +0200

Set terminal title to circo.
I've tried to restore the original title on exit but this feature is mostly
unsupported between terminals so I'm just ignoring it for now.

Diffstat:
Mcirco.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/circo.c b/circo.c @@ -21,8 +21,8 @@ char *argv0; /* macros */ -#define LENGTH(X) (sizeof X / sizeof X[0]) -#define BUFSZ 512 +#define LENGTH(X) (sizeof X / sizeof X[0]) +#define BUFSZ 512 /* VT100 escape sequences */ #define CLEAR "\33[2J" @@ -31,6 +31,7 @@ char *argv0; #define CURPOS "\33[%d;%dH" #define CURSON "\33[?25h" #define CURSOFF "\33[?25l" +#define TTLSET "\33]0;%s\007" #if defined CTRL && defined _AIX #undef CTRL @@ -983,8 +984,8 @@ main(int argc, char *argv[]) { if(!*nick) strncpy(nick, user ? user : "unknown", sizeof nick); + printf(TTLSET, "circo"); setup(); - if(*logfile) logp = fopen(logfile, "a"); sel = status = newbuf("status");