Skip to content

Commit 841d078

Browse files
authored
feat: full screen compact view, filtering, markdown rendering (#10)
- Changes "compact" list density mode to not be limited to 9 items per page. - Adds filtering capability to task lists (by manually typing search query) - Adds a means for quick filtering (via a list) - Adds markdown rendering via glamour
1 parent 4a90459 commit 841d078

37 files changed

+1062
-760
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
As mentioned before, once a task is created, you might want to add context to
2+
it.
3+
4+
You do that by pressing `c`. Go ahead, try it out. Try changing the text, and
5+
then save the file. This context text should get updated accordingly.
6+
7+
Once saved, you can also copy a tasks's context to your system clipboard by
8+
pressing `y`.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Let's get to the crux of omm: **adding** and **prioritizing** tasks. We'll begin
2+
with adding tasks.
3+
4+
You can add a task below the cursor by pressing `a`. Once you get acquainted
5+
with omm, you'll want to have more control on the position of the newly added
6+
task. omm offers the following keymaps for that.
7+
8+
o/a add task below cursor
9+
O add task above cursor
10+
I add task at the top
11+
A add task at the end
12+
13+
Go ahead, create a task, then move to the next guided item.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
You can filter tasks in a list by pressing `/`. Doing this will open up a search
2+
prompt, which will match your query with task prefixes.
3+
4+
Try it out now. You get out of the filtered state by pressing `q/esc/<ctrl+c>`.
5+
6+
Note: You cannot add tasks or move them around in a filtered state. But, you can
7+
move a task to the top of the list (by pressing ``). Doing this will also get
8+
you out of the filtered state.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
You can also choose the prefix you want to filter by with the means of a list,
2+
hereby called as the **Quick Filter List**. Press `ctrl+p` to open up a set of
3+
task prefixes contained in the currently active task list. Press `` to
4+
pre-populate the task list's search prompt with your selection.
5+
6+
Try it out now.
7+
8+
Note: Both the **Active Tasks List** and **Archived Tasks List** can be filtered
9+
separately, using either the manual filtering approach or via the **Quick Filter
10+
List**.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Once a task is created, its summary and context can be changed at any point.
2+
3+
You can update a task's summary by pressing `u`.
4+
5+
This will open up the the same prompt you saw when creating a new task, with the
6+
only difference that the task's summary will be pre-filled for you. This can
7+
come in handy when you want to quickly jot down a task for yourself (either by
8+
using the TUI, or by using the CLI (eg. `omm 'a hastily written task
9+
summary'`)), and then come back to it later to refine it more.
10+
11+
Similarly, you can also update a task's context any time (by pressing `c`).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
You can also add a task to omm via its command line interface. For example:
2+
3+
```bash
4+
omm 'prefix: a task summary'
5+
```
6+
7+
This will add an entry to the top of the active tasks list.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
You can also import more than one task at a time by using the `import`
2+
subcommand. For example:
3+
4+
```bash
5+
cat << 'EOF' | omm import
6+
orders: order new ACME rocket skates
7+
traps: draw fake tunnel on the canyon wall
8+
tech: assemble ACME jet-propelled pogo stick
9+
EOF
10+
```
11+
12+
omm will expect each line in stdin to hold one task's summary.

cmd/config.go renamed to cmd/assets/guide/config-a-sample-toml-config.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
package cmd
1+
Here's a sample TOML configuration file:
22

3-
var (
4-
sampleCfg = `db_path = "~/.local/share/omm/omm-w.db"
3+
```toml
4+
db_path = "~/.local/share/omm/omm-w.db"
55
tl_color = "#b8bb26"
66
atl_color = "#fabd2f"
77
title = "work"
88
list_density = "spacious"
99
show_context = false
1010
editor = "vi -u NONE"
11-
`
12-
)
11+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
omm allows you to change the some of its behavior via configuration, which it
2+
will consider in the order listed below:
3+
4+
- CLI flags (run `omm -h` to see details)
5+
- Environment variables (eg. `$OMM_EDITOR`)
6+
- A TOML configuration file (run `omm -h` to see where this lives; you can
7+
change this via the flag `--config-path`)
8+
9+
omm will consider configuration in the order laid out above, ie, CLI flags will
10+
take the highest priority.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Every flag listed by `omm -h` (except `--config-path`) has an environment
2+
variable counterpart, as well as a TOML config counterpart.
3+
4+
For example:
5+
6+
```text
7+
--show-context -> OMM_SHOW_CONTEXT -> show_context
8+
--editor -> OMM_EDITOR -> editor
9+
```

0 commit comments

Comments
 (0)