mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
Added "look_set_title" option in config file
This commit is contained in:
+6
-1
@@ -51,6 +51,7 @@ t_config_section config_sections[CONFIG_NUMBER_SECTIONS] =
|
||||
|
||||
/* config, look & feel section */
|
||||
|
||||
int cfg_look_set_title;
|
||||
int cfg_look_startup_logo;
|
||||
int cfg_look_startup_version;
|
||||
char *cfg_look_weechat_slogan;
|
||||
@@ -69,7 +70,11 @@ char *cfg_look_no_nickname;
|
||||
char *cfg_look_completor;
|
||||
|
||||
t_config_option weechat_options_look[] =
|
||||
{ { "look_startup_logo", N_("display " WEECHAT_NAME " logo at startup"),
|
||||
{ { "look_set_title", N_("set title for terminal window (curses GUI) with name & version"),
|
||||
N_("set title for terminal window (curses GUI) with name & version"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_set_title, NULL, NULL },
|
||||
{ "look_startup_logo", N_("display " WEECHAT_NAME " logo at startup"),
|
||||
N_("display " WEECHAT_NAME " logo at startup"),
|
||||
OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_TRUE,
|
||||
NULL, NULL, &cfg_look_startup_logo, NULL, NULL },
|
||||
|
||||
@@ -75,6 +75,7 @@ struct t_config_option
|
||||
int (*handler_change)(int *, char **);
|
||||
};
|
||||
|
||||
extern int cfg_look_set_title;
|
||||
extern int cfg_look_startup_logo;
|
||||
extern int cfg_look_startup_version;
|
||||
extern char *cfg_look_weechat_slogan;
|
||||
|
||||
@@ -1545,9 +1545,9 @@ gui_init ()
|
||||
|
||||
signal (SIGWINCH, gui_resize_term_handler);
|
||||
|
||||
#ifdef __LINUX__
|
||||
#ifdef __linux__
|
||||
/* set title for term window, not for console */
|
||||
if (strcmp (getenv ("TERM"), "linux") != 0)
|
||||
if (cfg_look_set_title && (strcmp (getenv ("TERM"), "linux") != 0))
|
||||
printf ("\e]2;" WEECHAT_NAME " " WEECHAT_VERSION "\a\e]1;" WEECHAT_NAME " " WEECHAT_VERSION "\a");
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user