You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/guide.go
+52-29Lines changed: 52 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ package cmd
2
2
3
3
import (
4
4
"database/sql"
5
+
"fmt"
5
6
"time"
6
7
7
8
pers "github.com/dhth/omm/internal/persistence"
@@ -31,7 +32,7 @@ instructions.
31
32
true,
32
33
},
33
34
{
34
-
"guide: tasks",
35
+
"domain: tasks",
35
36
`omm ("on-my-mind") is a task manager. You can also think of it as a keyboard
36
37
driven to-do list.
37
38
@@ -46,7 +47,7 @@ you want to save details that don't fit in a single line.
46
47
true,
47
48
},
48
49
{
49
-
"guide: task state",
50
+
"domain: task state",
50
51
`A task can be in one of two states: active or archived.
51
52
52
53
This list shows active tasks.
@@ -60,7 +61,7 @@ Press <tab> to see the archived list.
60
61
true,
61
62
},
62
63
{
63
-
"guide: task details",
64
+
"domain: task details",
64
65
`The "Task Details" pane is intended for when you simply want to read all the
65
66
details associated with a task in a full screen view.
66
67
@@ -78,7 +79,7 @@ smaller display at the moment.
78
79
true,
79
80
},
80
81
{
81
-
"guide: an archived task",
82
+
"domain: an archived task",
82
83
`This is the archived list, meaning it holds tasks that are no longer being
83
84
worked on.
84
85
@@ -92,41 +93,34 @@ Press tab/q/esc/ctrl+c to go back to the active list.
92
93
false,
93
94
},
94
95
{
95
-
"guide: list density",
96
+
"visuals: list density",
96
97
`omm's task lists can be viewed in two density modes: compact and spacious.
97
98
98
99
This is the compact mode. As opposed to this, the spacious mode shows tasks in a
99
100
more roomier list, alongside highlighting prefixes (we'll see what that means),
100
101
and showing creation timestamps. Since the list in this mode takes more space,
101
102
the context pane is shorter than the one in the compact mode.
102
103
103
-
omm starts up with compact mode by default, but you can change that by either
104
-
setting the environment variable $OMM_LIST_DENSITY=spacious, or by passing the
105
-
flag "--list-density=spacious" to omm (the latter takes priority).
106
-
107
-
You can toggle between the two modes by pressing "v". Choose whichever mode fits
108
-
your workflow better.
104
+
omm starts up with compact mode by default (you can change this, as we'll see
105
+
soon). You can toggle between the two modes by pressing "v". Choose whichever
106
+
mode fits your workflow better.
109
107
110
108
Try it out. Come back to this mode once you're done.
111
109
`,
112
110
true,
113
111
},
114
112
{
115
-
"guide: toggling context pane",
113
+
"visuals: toggling context pane",
116
114
`The context pane can be toggled on/off by pressing "C".
117
115
118
116
You can choose to display it or not based on your preference. For convenience,
119
117
the lists will always highlight tasks that have a context associated with them
120
118
by having a "(c)" marker on them.
121
-
122
-
You can start omm with the context pane hidden by either setting the environment
123
-
variable OMM_SHOW_CONTEXT to "0/1" or "true/false", or by passing the flag
124
-
"--show-context=false" (the latter takes priority).
125
119
`,
126
120
true,
127
121
},
128
122
{
129
-
"guide: adding tasks",
123
+
"actions: adding tasks",
130
124
`Let's get to the crux of omm: adding and prioritizing tasks.
131
125
132
126
We'll begin with adding tasks. You can add a task below the cursor by pressing
@@ -145,7 +139,7 @@ Go ahead, create a task, then move to the next guided item.
145
139
true,
146
140
},
147
141
{
148
-
"guide: adding tasks via the CLI",
142
+
"actions: adding tasks via the CLI",
149
143
`You can also add a task to omm via its command line interface. For example:
150
144
151
145
omm 'prefix: a task summary'
@@ -166,24 +160,19 @@ omm will expect each line in stdin to hold one task's summary.
166
160
true,
167
161
},
168
162
{
169
-
"guide: adding context",
163
+
"actions: adding context",
170
164
`As mentioned before, once a task is created, you might want to add context to
171
165
it.
172
166
173
-
You do that by pressing "c". This will open up the text editor you've configured
174
-
via the environment variables $OMM_EDITOR/$EDITOR/$VISUAL (looked up in that
175
-
order). You can override this behavior by passing the "editor" flag to omm, like
176
-
"--editor='vi -u NONE'". If none of these are set, omm falls back to "vi".
177
-
178
-
Go ahead, press "c". Try changing the text, and then save the file. This context
179
-
text should get updated accordingly.
167
+
You do that by pressing "c". Go ahead, try it out. Try changing the text, and
168
+
then save the file. This context text should get updated accordingly.
180
169
181
170
Once saved, you can also copy a tasks's context to your system clipboard by pressing "y".
182
171
`,
183
172
true,
184
173
},
185
174
{
186
-
"guide: context bookmarks",
175
+
"domain: context bookmarks",
187
176
`Sometimes you'll save some URLs to a task's context.
188
177
189
178
Such URLs (eg. https://github.com/dhth/omm, https://tools.dhruvs.space,
@@ -201,7 +190,7 @@ Try both approaches now. Press "b", interact with the list, and then press "B".
201
190
true,
202
191
},
203
192
{
204
-
"guide: task priorities",
193
+
"domain: task priorities",
205
194
`At its core, omm is a dynamic list that maintains a sequence of tasks based on
206
195
the priorities you assign them.
207
196
@@ -220,7 +209,7 @@ the top.
220
209
true,
221
210
},
222
211
{
223
-
"guide: updating task details",
212
+
"actions: updating task details",
224
213
`Once a task is created, its summary and context can be changed at any point.
225
214
226
215
You can update a task's summary by pressing "u".
@@ -235,6 +224,40 @@ Similarly, you can also update a task's context any time (by pressing "c").
235
224
`,
236
225
true,
237
226
},
227
+
{
228
+
"config: changing the defaults",
229
+
`omm allows you to change the some of its behavior via configuration, which it
230
+
will consider in the order listed below:
231
+
232
+
- CLI flags (run "omm -h" to see details)
233
+
- Environment variables (eg. "OMM_EDITOR")
234
+
- A TOML configuration file (run "omm -h" to see where this lives; you can
235
+
change this via the flag "--config-path")
236
+
237
+
omm will consider configuration in the order laid out above, ie, CLI flags will
238
+
take the highest priority.
239
+
`,
240
+
true,
241
+
},
242
+
{
243
+
"config: flags, env vars, and config file",
244
+
`Every flag listed by "omm -h" (except "--config-path") has an environment
245
+
variable counterpart, as well as a TOML config counterpart.
0 commit comments