diff options
| author | verdant <im@verdant.ee> | 2026-07-28 17:08:18 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-07-28 17:09:32 +0800 |
| commit | 365d54d6de5ad84238698f986649aa4af0fd8dae (patch) | |
| tree | 2fcd88236c91721470ff6573b316cbd91c42a0fb /fm.c | |
| parent | d760f14a540ea334ade0d705b44a9f5e52ee56d8 (diff) | |
| download | sf-365d54d6de5ad84238698f986649aa4af0fd8dae.tar.gz sf-365d54d6de5ad84238698f986649aa4af0fd8dae.zip | |
Implement status bar
Print current working directory
Diffstat (limited to 'fm.c')
| -rw-r--r-- | fm.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -147,6 +147,7 @@ fm_init(terminal *t) info->next = xmalloc(sizeof(file_list)); fm_file_list_init(info->cur, 30); fm_file_list_init(info->next, 30); + create_status_bar_win(t); return info; } @@ -405,3 +406,17 @@ open_with_editor(char **argv) return 0; } + +void +create_status_bar_win(terminal *t) +{ + wm_create_new_w(t, "status_bar", 1, t->maxx, t->maxy - 1, 0); +} + +void +draw_status_bar(window *bar_win, const char *cwd) +{ + werase(bar_win->win); + + mvwprintw(bar_win->win, bar_win->height - 1, 0, "%s", cwd); +} |
