X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=xterm.h;h=31b153ee83ee970a4082b9e8af68ca77f100eea7;hp=0e8f970ad3e40f5396cd981b625fea5c41c0bbde;hb=d23094706c228c63c7c7ab8f337fb5dd886c4109;hpb=4eaac5c4a87b84ea9ec0668b4e088ac27e2d1106 diff --git a/xterm.h b/xterm.h index 0e8f970..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(const 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(const 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 */