diff --git a/src/config.rs b/src/config.rs index 0a1e29bd..4c7abf0a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -512,7 +512,7 @@ impl View { Some(":device") => draw!(|app|view_device(app)), Some(":dialog") => Self::boxed(move|state, to|draw_dialog(to, word.split("/").skip(1), state)), Some(":sessions") => Self::boxed(move|_, to|view_sessions().draw(to)), - Some(":status") => Self::boxed(move|_, to|"TODO: Status Bar".draw(to)), + Some(":status") => Self::boxed(move|state, to|draw_status_bar(to, state)), Some(":editor") => Self::boxed(move|_, to|"TODO Editor".draw(to)), Some(":transport") => Self::boxed(move|_, to|view_transport(true, "", "", "").draw(to)), Some(":debug") => Self::boxed(move|_, to|format!("[{:?}]", to.area()).exact_h(1).draw(to)), @@ -526,6 +526,10 @@ impl View { } } +pub fn draw_status_bar (to: &mut Tui, state: &App) -> Drawn { + bar(Split::South, 1u16, dim(true, "Mode"), bold(true, &state.mode)).push_x(1).draw(to) +} + /// Load custom view definition. pub fn views_add <'a> (views: &Views, expr: impl Language) -> UsuallyRef<'a, ()> { views.try_write().unwrap().insert(