X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=xterm.h;h=ffb162de5359b9fddd344160d3e2792920c03ef4;hp=0e8f970ad3e40f5396cd981b625fea5c41c0bbde;hb=3df8394237281da49430194617e00a292b6067c4;hpb=4eaac5c4a87b84ea9ec0668b4e088ac27e2d1106 diff --git a/xterm.h b/xterm.h index 0e8f970..ffb162d 100644 --- a/xterm.h +++ b/xterm.h @@ -6,10 +6,18 @@ #ifndef MUTT_XTERM_H #define MUTT_XTERM_H +#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 */