aboutsummaryrefslogtreecommitdiff
path: root/src/pomo/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/pomo/state.rs')
-rw-r--r--src/pomo/state.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pomo/state.rs b/src/pomo/state.rs
index 3076174..f4a7a5e 100644
--- a/src/pomo/state.rs
+++ b/src/pomo/state.rs
@@ -31,6 +31,12 @@ pub struct Pomo {
pub tasks: Vec<Task>,
pub task_state: ListState,
pub should_quit: bool,
+ pub show_help: bool
+}
+
+pub struct Command {
+ pub key: &'static str,
+ pub desc: &'static str,
}
impl Pomo {
@@ -47,6 +53,7 @@ impl Pomo {
tasks: dummy_tasks,
task_state: ListState::default(),
should_quit: false,
+ show_help: false
}
}
@@ -106,4 +113,14 @@ impl Pomo {
self.tasks[i].is_done = !self.tasks[i].is_done;
}
}
+
+ pub fn get_commands(&self) -> Vec<Command> {
+ vec![
+ Command { key: "Space", desc: "Toggle Timer" },
+ Command { key: "j/k", desc: "Navigate Tasks" },
+ Command { key: "Enter", desc: "Toggle Done" },
+ Command { key: "?", desc: "Toggle Help" },
+ Command { key: "q", desc: "Quit" },
+ ]
+ }
}