fe

terminal file explorer and picker

git clone https://9o.is/git/fe.git

commit 26ea0b8c37c551238e897c2709c09a96d1894ce0
parent 85330f0636e8e0b41b3b261025c852fa19ed594e
Author: Jul <jul@9o.is>
Date:   Thu,  7 Aug 2025 09:05:40 -0400

set title to blank

Diffstat:
Mtty.c | 4++++
Mtty.h | 1+
Mtty_interface.c | 2++
3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tty.c b/tty.c @@ -175,6 +175,10 @@ void tty_moveup(tty_t *tty, int i) { tty_printf(tty, "%c%c%iA", 0x1b, '[', i); } +void tty_title(tty_t *tty, char *title) { + tty_printf(tty, "\033]0;%s\007", title); +} + void tty_printf(tty_t *tty, const char *fmt, ...) { va_list args; va_start(args, fmt); diff --git a/tty.h b/tty.h @@ -31,6 +31,7 @@ void tty_setunderline(tty_t *tty); void tty_setnormal(tty_t *tty); void tty_setnowrap(tty_t *tty); void tty_setwrap(tty_t *tty); +void tty_title(tty_t *tty, char *title); #define TTY_COLOR_BLACK 0 #define TTY_COLOR_RED 1 diff --git a/tty_interface.c b/tty_interface.c @@ -21,6 +21,7 @@ static void clear(tty_interface_t *state) { tty_moveup(tty, line - 1); } tty_unhide_cursor(tty); + tty_title(tty, ""); tty_flush(tty); } @@ -44,6 +45,7 @@ static void draw(tty_interface_t *state) { } } + tty_title(tty, ""); tty_clearline(tty); tty_setcol(tty, 0); tty_printf(tty, "%s", entries->path);