File: title.c

package info (click to toggle)
splitvt 1.6.6-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ansic: 4,953; sh: 99; perl: 15; makefile: 10
file content (13 lines) | stat: -rw-r--r-- 230 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Set the titlebar on an xterm */

#include <stdio.h>

main(int argc, char *argv[])
{
	if ( argc != 2 ) {
		fprintf(stderr, "%s title-text\n", argv[0]);
		exit(1);
	}
	printf("\033]0;%s\07", argv[1]); fflush(stdout);
	exit(0);
}