Skip to content

Commit c0b8c0c

Browse files
committed
Update README and help message. Bump to version 1.1.0
Remove Getting started section because mdt works out of the box now. Move some configuration examples from Getting started to Configuration section.
1 parent 0364119 commit c0b8c0c

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

README.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
## :package: Dependencies
1919

20-
- POSIX-compliant shell (sh, dash, bash etc.)
20+
- POSIX-compliant shell (dash, bash, zsh etc.)
2121
- [gum](https://github.com/charmbracelet/gum#installation)
2222

2323
## :rocket: Installation
2424

2525
### Install as a package
2626

27-
`mdt` is available in the [Arch User Repository](https://aur.archlinux.org/packages/mdt). If you use Arch or an Arch-based distro, you can use `makepkg` or your AUR helper of choice to install the `mdt` package.
27+
mdt is available in the [Arch User Repository](https://aur.archlinux.org/packages/mdt). If you use Arch or an Arch-based distro, you can use `makepkg` or your AUR helper of choice to install the `mdt` package.
2828

2929
### Install using `make`
3030

@@ -45,42 +45,35 @@ chmod +x mdt
4545
mv mdt ~/.local/bin
4646
```
4747

48-
## :memo: Getting started
49-
50-
1. Create a todo lists directory:
48+
## :gear: Configuration
5149

52-
```sh
53-
mkdir ~/tasks
54-
```
50+
| Option | Environment Variable | Description |
51+
| ------------ | --------------------- | ---------------------------------------------------------------------- |
52+
| -d, --dir | MDT_DIR | Path to the tasks directory. By default the current working directory. |
53+
| -i, --inbox | MDT_INBOX | Path to the inbox file. By default "todo.md". |
54+
| --color | MDT_MAIN_COLOR | Main color. |
55+
| --prompt | MDT_PROMPT | Input prompt character. Default is '◆'. |
56+
| --cursor | MDT_CURSOR | Selection character. Default is '➔'. |
57+
| --item-width | MDT_ITEM_WIDTH | Todo items width. 0 for no wrap, default is 75. |
58+
| --input-width | MDT_INPUT_WIDTH | Input prompt width. 0 for no wrap, default is 65. |
59+
| --editor | MDT_EDITOR, EDITOR | Markdown file editor. |
5560

56-
2. Create an inbox:
61+
Examples of using options:
5762

5863
```sh
59-
touch ~/tasks/inbox.md
64+
# Static path to the inbox
65+
alias mdt='mdt --dir ~/tasks --inbox ~/tasks/inbox.md'
66+
# Dynamic path to the inbox
67+
alias mdt='mdt --dir ~/tasks --inbox ~/tasks/"$(date -I).md"'
6068
```
6169

62-
3. Create an alias to run `mdt`. Put something like this in your `~/.bashrc` file:
70+
Examples of using environment variables:
6371

6472
```sh
65-
alias mdt='mdt --dir ~/tasks --inbox ~/tasks/inbox.md'
73+
export MDT_MAIN_COLOR='#5FAFFF'
74+
export MDT_EDITOR='nvim -c "set nonumber"'
6675
```
6776

68-
4. Reload your `.bashrc` by running `source ~/.bashrc` or just restart the terminal window.
69-
5. In case you want to edit markdown files manually, check out this site: https://www.markdownguide.org/cheat-sheet
70-
71-
## :gear: Configuration
72-
73-
| Option | Environment Variable | Description |
74-
| ------------ | --------------------- | ------------------------------------------------- |
75-
| -d, --dir | MDT_DIR | Path to the tasks directory. |
76-
| -i, --inbox | MDT_INBOX | Path to the inbox file. |
77-
| --color | MDT_MAIN_COLOR | Main color. |
78-
| --prompt | MDT_PROMPT | Input prompt character. Default is '◆'. |
79-
| --cursor | MDT_CURSOR | Selection character. Default is '➔'. |
80-
| --item-width | MDT_ITEM_WIDTH | Todo items width. 0 for no wrap, default is 75. |
81-
| --input-width | MDT_INPUT_WIDTH | Input prompt width. 0 for no wrap, default is 65. |
82-
| --editor | MDT_EDITOR, EDITOR | Markdown file editor. |
83-
8477
## :keyboard: Keybindings
8578

8679
| Keybinding | Description |
@@ -90,3 +83,4 @@ alias mdt='mdt --dir ~/tasks --inbox ~/tasks/inbox.md'
9083
| Tab/Space/x | Select |
9184
| a/A | Select/unselect all |
9285
| Enter | Accept |
86+

mdt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ file_editor="${MDT_EDITOR:-${EDITOR}}"
1515
################################################
1616

1717
_me="${0##*/}"
18-
_mdt_version="1.0.1"
18+
_mdt_version="1.1.0"
1919

2020
print_help()
2121
{
@@ -28,8 +28,15 @@ Usage
2828
[--input-width <arg>] [--editor <arg>] [--version] [-h|--help]
2929
3030
Options
31-
-d, --dir Path to the todos directory
32-
-i, --inbox Path to the inbox note
31+
-d, --dir Path to the tasks directory
32+
-i, --inbox Path to the inbox file
33+
--color Main color
34+
--prompt Input prompt character
35+
--cursor Selection character
36+
--item-width Todo items width
37+
--input-width Input prompt width
38+
--editor Markdown file editor
39+
--version Print version
3340
-h, --help Print help
3441
"
3542
exit 0

0 commit comments

Comments
 (0)