/*
* title v1.0
* (c) 2005 Joe Laffey, http://laffey.tv/
*
* This program comes with ABSOLUTELY NO WARRANTY. You may use the
* code how ever you wish
*
* Set the window title (and icon title) for an xterm compatible
* terminal emulator which supports escape sequences.
*
* I use this with rxvt under cygwin, as well as NetBSD.
*
* Save file as title.c
* Compile with gcc -o title title.c
*/

#include <sysexits.h>
#include <stdio.h>

int main(int argc, char **argv)
{
        if(argc != 2)
        {
                fprintf(stderr, "usage: %s <window_title>\n", argv[0]);
                exit(EX_USAGE);
        }

        printf("\e]0;%s\a", argv[1]);

	return 0;

}



