aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-03-15 18:33:31 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-03-15 18:33:31 +0000
commitd2f5a95a9b6212c7f6ba462131b9d3e6aec94db5 (patch)
treebe32bbac734f3ab34bb1f0dd46f83ba1dc9426cc /main.c
parent[w3m-dev 03132] Re: Reload image (diff)
downloadw3m-d2f5a95a9b6212c7f6ba462131b9d3e6aec94db5.tar.gz
w3m-d2f5a95a9b6212c7f6ba462131b9d3e6aec94db5.zip
-title support
modified [w3m-dev-en 00710] contrib: unofficial "xterm title" patch, updated for w3m-0.3 by Moritz Barsnick <barsnick@gmx.net> * NEWS: -title * fm.h (displayTitleTerm): added * proto.h (term_title): added * main.c (fusage): add -title (MAIN): add -title (quitfm): term_title("") * display.c (displayBuffer): term_title() * terms.c (title_str): added (TERM_INFO): added (term_info): modified from mouse_term_info (term_info_list): modified from xterm_mouse_term add "screen" (set_tty): check displayTitleTerm (term_title): added From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index cd7d7c0..38e7afc 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.88 2002/03/15 16:35:46 ukai Exp $ */
+/* $Id: main.c,v 1.89 2002/03/15 18:33:32 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -230,6 +230,7 @@ fusage(FILE * f, int err)
#endif
fprintf(f, " -W toggle wrap search mode\n");
fprintf(f, " -X don't use termcap init/deinit\n");
+ fprintf(f, " -title[=TERM] set buffer name to terminal title string\n");
fprintf(f, " -o opt=value assign value to config option\n");
fprintf(f, " -config file specify config file\n");
fprintf(f, " -help print this usage message\n");
@@ -659,6 +660,10 @@ MAIN(int argc, char **argv, char **envp)
squeezeBlankLine = TRUE;
else if (!strcmp("-X", argv[i]))
Do_not_use_ti_te = TRUE;
+ else if (!strcmp("-title", argv[i]))
+ displayTitleTerm = getenv("TERM");
+ else if (!strncmp("-title=", argv[i], 7))
+ displayTitleTerm = argv[i]+7;
else if (!strcmp("-o", argv[i])) {
if (++i >= argc || !strcmp(argv[i], "?")) {
show_params_p = 1;
@@ -2168,6 +2173,7 @@ qquitfm(void)
void
quitfm(void)
{
+ term_title(""); /* XXX */
#ifdef USE_IMAGE
if (activeImage)
termImage();