43#ifdef HAVE_NCURSESW_NCURSES_H
44#include <ncursesw/term.h>
45#elif defined(HAVE_NCURSES_NCURSES_H)
46#include <ncurses/term.h>
47#elif defined(HAVE_NCURSES_H)
55static const char *
TSL =
"\033]0;";
57static const char *
FSL =
"\007";
68 char *cap = tigetstr(name);
69 if (!cap || (cap == (
char *) -1) || (*cap ==
'\0'))
83 static const char *known[] = {
84 "color-xterm",
"cygwin",
"eterm",
"kterm",
"nxterm",
85 "putty",
"rxvt",
"screen",
"xterm", NULL,
88#ifdef HAVE_USE_EXTENDED_NAMES
105 int tcapi = tigetflag(
"XT");
113 for (
const char **termp = known; *termp; termp++)
130 if (!str || (*str ==
'\0'))
133 fprintf(stderr,
"%s%s%s",
TSL, str,
FSL);
144 if (!str || (*str ==
'\0'))
148 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.
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.