X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=xterm.h;h=31b153ee83ee970a4082b9e8af68ca77f100eea7;hp=62a8d7fb5abae2c39e679392efe7b108b7a2bcd2;hb=d23094706c228c63c7c7ab8f337fb5dd886c4109;hpb=dc2c2ef1ba4d0a0f3c2552459b9f962594a3536b diff --git a/xterm.h b/xterm.h index 62a8d7f..31b153e 100644 --- a/xterm.h +++ b/xterm.h @@ -6,10 +6,19 @@ #ifndef MUTT_XTERM_H #define MUTT_XTERM_H +#include +#include + /* sets the current xterm's title */ -void mutt_xterm_set_title (char *title); +static inline void mutt_xterm_set_title(const char *title) { + printf("\033]2;%s\007", NONULL(title)); + fflush(stdout); +} /* sets the current xterm's icon */ -void mutt_xterm_set_icon (char *name); +static inline void mutt_xterm_set_icon(const char *name) { + printf("\033]1;%s\007", NONULL(name)); + fflush(stdout); +} #endif /* !MUTT_XTERM_H */