36#ifdef HAVE_NCURSESW_NCURSES_H
37#include <ncursesw/term.h>
38#elif defined(HAVE_NCURSES_NCURSES_H)
39#include <ncurses/term.h>
46static const char *
TSL =
"\033]0;";
48static const char *
FSL =
"\007";
59 char *cap = tigetstr(name);
60 if (!cap || (cap == (
char *) -1) || (*cap ==
'\0'))
74 static const char *known[] = {
75 "color-xterm",
"cygwin",
"eterm",
"kterm",
"nxterm",
76 "putty",
"rxvt",
"screen",
"xterm", NULL,
79#ifdef HAVE_USE_EXTENDED_NAMES
96 int tcapi = tigetflag(
"XT");
104 for (
const char **termp = known; *termp; termp++)
121 if (!str || (*str ==
'\0'))
124 fprintf(stderr,
"%s%s%s",
TSL, str,
FSL);
135 if (!str || (*str ==
'\0'))
139 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.
const char * mutt_tigetstr(const char *name)
Get terminal capabilities.
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.