35#ifdef HAVE_NCURSESW_NCURSES_H
36#include <ncursesw/term.h>
37#elif defined(HAVE_NCURSES_NCURSES_H)
38#include <ncurses/term.h>
45static const char *
TSL =
"\033]0;";
47static const char *
FSL =
"\007";
57 const char *known[] = {
58 "color-xterm",
"cygwin",
"eterm",
"kterm",
"nxterm",
59 "putty",
"rxvt",
"screen",
"xterm", NULL,
62#ifdef HAVE_USE_EXTENDED_NAMES
64 char *tcaps = tigetstr(
"tsl");
65 if (tcaps && (tcaps != (
char *) -1) && *tcaps)
70 tcaps = tigetstr(
"fsl");
71 if (tcaps && (tcaps != (
char *) -1) && *tcaps)
79 int tcapi = tigetflag(
"XT");
87 for (
const char **termp = known; termp; termp++)
105 if (!str || (*str ==
'\0'))
108 fprintf(stderr,
"%s%s%s",
TSL, str,
FSL);
119 if (!str || (*str ==
'\0'))
123 fprintf(stderr,
"\033]1;%s\007", str);
Convenience wrapper for the library headers.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
Define wrapper functions around Curses.
bool TsSupported
Terminal Setting is supported.
static const char * FSL
FSL: from_status_line - Sent after the terminal title.
static const char * TSL
TSL: to_status_line - Sent before the terminal title.
void mutt_ts_icon(char *str)
Set the icon in the terminal title bar.
bool mutt_ts_capability(void)
Check terminal capabilities.
void mutt_ts_status(char *str)
Set the text of the terminal title bar.
Set the terminal title/icon.