diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 9 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 3 | ||||
-rw-r--r-- | src/LYMain.c | 7 | ||||
-rw-r--r-- | src/LYReadCFG.c | 3 | ||||
-rw-r--r-- | src/LYrcFile.h | 3 |
5 files changed, 20 insertions, 5 deletions
diff --git a/src/GridText.c b/src/GridText.c index 13f2fc1a..44825b5b 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.321 2020/01/21 22:19:23 tom Exp $ + * $LynxId: GridText.c,v 1.324 2020/02/24 00:30:01 tom Exp $ * * Character grid hypertext object * =============================== @@ -1734,6 +1734,13 @@ static void display_title(HText *text) percent[0] = '\0'; } + /* Update the terminal-emulator title */ + if (update_term_title) { + CTRACE((tfp, "update_term_title:%s\n", title)); + fprintf(stderr, "\033]0;%s%sLynx\007", title, *title ? " - " : ""); + fflush(stderr); + } + /* * Generate and display the title string, with page indicator * if appropriate, preceded by the toolbar token if appropriate, diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 0a09a929..9f36d5f9 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYGlobalDefs.h,v 1.152 2020/02/23 21:20:05 tom Exp $ + * $LynxId: LYGlobalDefs.h,v 1.153 2020/02/23 23:10:16 Keith.Bowes Exp $ * * global variable definitions */ @@ -405,6 +405,7 @@ extern "C" { extern BOOLEAN no_margins; extern BOOLEAN no_pause; extern BOOLEAN no_title; + extern BOOLEAN update_term_title; extern BOOLEAN historical_comments; extern BOOLEAN html5_charsets; extern BOOLEAN minimal_comments; diff --git a/src/LYMain.c b/src/LYMain.c index 90581881..6d5166d4 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.288 2020/02/23 21:20:05 tom Exp $ + * $LynxId: LYMain.c,v 1.289 2020/02/24 00:17:10 Keith.Bowes Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -410,6 +410,7 @@ BOOLEAN no_list = FALSE; BOOLEAN no_margins = FALSE; BOOLEAN no_pause = FALSE; BOOLEAN no_title = FALSE; +BOOLEAN update_term_title = FALSE; BOOLEAN no_url_redirection = FALSE; /* Don't follow URL redirections */ BOOLEAN pseudo_inline_alts = MAKE_PSEUDO_ALTS_FOR_INLINES; BOOLEAN scan_for_buried_news_references = TRUE; @@ -4015,6 +4016,10 @@ bug which treated '>' as a co-terminator for\ndouble-quotes and tags" "unique_urls", 4|TOGGLE_ARG, unique_urls, "toggles use of unique-urls setting for -dump and -listonly options" ), + PARSE_SET( + "update_term_title", 4|SET_ARG, update_term_title, + "enables updating the title of terminal emulators" + ), #if defined(USE_MOUSE) PARSE_SET( "use_mouse", 4|SET_ARG, LYUseMouse, diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 78dc94d8..b79e58da 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYReadCFG.c,v 1.197 2020/02/23 21:15:14 tom Exp $ + * $LynxId: LYReadCFG.c,v 1.198 2020/02/23 23:09:33 Keith.Bowes Exp $ */ #ifndef NO_RULES #include <HTRules.h> @@ -1648,6 +1648,7 @@ static Config_Type Config_Table [] = PARSE_SET(RC_NO_REFERER_HEADER, LYNoRefererHeader), PARSE_SET(RC_NO_TABLE_CENTER, no_table_center), PARSE_SET(RC_NO_TITLE, no_title), + PARSE_SET(RC_UPDATE_TERM_TITLE, update_term_title), PARSE_FUN(RC_NONRESTARTING_SIGWINCH, nonrest_sigwinch_fun), PARSE_FUN(RC_OUTGOING_MAIL_CHARSET, outgoing_mail_charset_fun), #ifdef DISP_PARTIAL diff --git a/src/LYrcFile.h b/src/LYrcFile.h index 19530ecc..da45fbf3 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYrcFile.h,v 1.55 2020/02/23 21:13:14 tom Exp $ + * $LynxId: LYrcFile.h,v 1.56 2020/02/23 23:08:55 Keith.Bowes Exp $ */ #ifndef LYRCFILE_H #define LYRCFILE_H @@ -179,6 +179,7 @@ #define RC_NO_REFERER_HEADER "no_referer_header" #define RC_NO_TABLE_CENTER "no_table_center" #define RC_NO_TITLE "no_title" +#define RC_UPDATE_TERM_TITLE "update_term_title" #define RC_NUMBER_FIELDS_ON_LEFT "number_fields_on_left" #define RC_NUMBER_LINKS_ON_LEFT "number_links_on_left" #define RC_OUTGOING_MAIL_CHARSET "outgoing_mail_charset" |