aboutsummaryrefslogtreecommitdiffstats
path: root/fm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fm.c')
-rw-r--r--fm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fm.c b/fm.c
index 2f9c66c..28a7ff3 100644
--- a/fm.c
+++ b/fm.c
@@ -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);
+}