Set the window title for command prompt.

This is a bit more interesting than just displaying "tempscript.sh".
This commit is contained in:
Simon Howard 2015-11-09 23:30:34 -05:00
parent 0f569394d1
commit c9debbb1ce

View file

@ -26,6 +26,7 @@
#define RESPONSE_FILE "/tmp/launcher.rsp"
#define TEMP_SCRIPT "/tmp/tempscript.sh"
#define WINDOW_TITLE PACKAGE_STRING " command prompt"
static char *executable_path;
@ -183,6 +184,9 @@ void OpenTerminalWindow(const char *doomwadpath)
fprintf(stream, "export DOOMWADPATH\n");
fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT);
// Window title to something more interesting than "tempscript":
fprintf(stream, "echo -en \"\\033]0;%s\\a\"\n", WINDOW_TITLE);
// Display a useful message:
fprintf(stream, "clear\n");