X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=xterm.h;h=ffb162de5359b9fddd344160d3e2792920c03ef4;hp=62a8d7fb5abae2c39e679392efe7b108b7a2bcd2;hb=3df8394237281da49430194617e00a292b6067c4;hpb=dc2c2ef1ba4d0a0f3c2552459b9f962594a3536b diff --git a/xterm.h b/xterm.h index 62a8d7f..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 (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 */