Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub struct App<S: Store> {
is_bell: bool,
is_fold: bool,
is_no_title: bool,
is_no_status: bool,
is_skip_empty_diffs: bool,
showing_execution_id: Option<ExecutionId>,
shell: Option<(String, Vec<String>)>,
Expand Down Expand Up @@ -127,6 +128,7 @@ impl<S: Store> App<S> {
diff_mode,
cli.is_bell,
cli.is_no_title,
cli.is_no_status,
read_only,
timemachine_mode,
);
Expand Down Expand Up @@ -157,6 +159,7 @@ impl<S: Store> App<S> {
is_bell: cli.is_bell,
is_fold: !cli.is_unfold,
is_no_title: cli.is_no_title,
is_no_status: cli.is_no_status,
is_suspend: Arc::new(Mutex::new(false)),
is_skip_empty_diffs,
showing_execution_id: None,
Expand Down
3 changes: 3 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ pub struct Cli {
#[arg(short = 't', long = "no-title", help = "Turn off header")]
pub is_no_title: bool,

#[arg(short = 'S', long = "no-status", help = "Turn off status bar")]
pub is_no_status: bool,

#[arg(
short = 'w',
long = "unfold",
Expand Down
7 changes: 6 additions & 1 deletion src/components/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub struct Home {
config: Config,
runtime_config: RuntimeConfig,
is_no_title: bool,
is_no_status: bool,

mode: Mode,
command_component: Command,
Expand All @@ -46,6 +47,7 @@ impl Home {
diff_mode: Option<DiffMode>,
is_bell: bool,
is_no_title: bool,
is_no_status: bool,
read_only: bool,
timemachine_mode: bool,
) -> Self {
Expand All @@ -54,6 +56,7 @@ impl Home {
command_tx: None,
config: config.clone(),
is_no_title,
is_no_status,
mode: Default::default(),
command_component: Command::new(runtime_config.clone()),
interval_component: Interval::new(runtime_config.clone()),
Expand Down Expand Up @@ -188,7 +191,9 @@ impl Component for Home {
let [prompt, status] =
Layout::horizontal([Constraint::Fill(100), Constraint::Length(32)]).areas(footer);
self.prompt_component.draw(f, prompt)?;
self.status_component.draw(f, status)?;
if !self.is_no_status {
self.status_component.draw(f, status)?;
}

Ok(())
}
Expand Down