diff --git a/Cargo.lock b/Cargo.lock index e5f61e6..2b91acf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,7 @@ dependencies = [ [[package]] name = "forget" -version = "0.1.0" +version = "1.0.0" dependencies = [ "bitflags", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 1e1419a..9e2c8fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "forget" -version = "0.1.0" +version = "1.0.0" authors = ["Devin R "] license = "MIT/Apache-2.0" description = "Command line todo in Rust." @@ -9,6 +9,7 @@ keywords = ["todo", "cli", "productivity", "console", "terminal"] categories = ["development-tools", "text-editors"] edition = "2018" readme = "README.md" +exclude = [ "resources" ] [badges] travis-ci = { repository = "DevinR528/forget" } diff --git a/README.md b/README.md index a1040eb..1eb22d8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ a command can be run when the item is selected (press Enter while highlighted) t process and will not affect the UI. `forget` is a multi-threaded application the UI event loop and input loop each run on a separate thread as well as any command spawned, everything is cleaned up when the main thread exits. -![forget-demo](https://github.com/DevinR528/forget/resources/forget-demo.gif) +![forget-demo](https://github.com/DevinR528/forget/blob/master/resources/forget-demo.gif) # Install ```bash diff --git a/src/app.rs b/src/app.rs index 0492819..c8198f9 100644 --- a/src/app.rs +++ b/src/app.rs @@ -417,21 +417,19 @@ impl App { self.edit_todo = !flag; if self.edit_todo { - self.add_todo.task = self.sticky_note.items + self.add_todo.task = self + .sticky_note + .items .get(self.tabs.index) - .map(|n| { - n.list.get_selected() - .map(|t| t.task.clone()) - }) + .map(|n| n.list.get_selected().map(|t| t.task.clone())) .flatten() .unwrap_or_default(); - - self.add_todo.cmd = self.sticky_note.items + + self.add_todo.cmd = self + .sticky_note + .items .get(self.tabs.index) - .map(|n| { - n.list.get_selected() - .map(|t| t.cmd.clone()) - }) + .map(|n| n.list.get_selected().map(|t| t.cmd.clone())) .flatten() .unwrap_or_default(); } diff --git a/src/config.rs b/src/config.rs index 4e88fd8..51c53d2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -318,7 +318,7 @@ thread_local! { pub static APP: ListState = ListState { }, Todo { date: Local::now(), - task: "You can add a Todo by hitting ctrl-j".into(), + task: "You can add a Todo by hitting ctrl-n".into(), cmd: String::new(), completed: false }, diff --git a/src/ux.rs b/src/ux.rs index 758e009..f4540d4 100644 --- a/src/ux.rs +++ b/src/ux.rs @@ -191,7 +191,12 @@ where .wrap(true) .render(f, chunks[1]); } else { - let note = &app.sticky_note.items.get(app.tabs.index).map(|n| n.note.clone()).unwrap_or_default(); + let note = &app + .sticky_note + .items + .get(app.tabs.index) + .map(|n| n.note.clone()) + .unwrap_or_default(); let text = Text::styled(note, Style::default().fg(Color::Green)); Paragraph::new(vec![text].iter()) .block(