Skip to content

Commit

Permalink
Finish first version of documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanteria committed Jan 6, 2025
1 parent 54d89aa commit 31232dd
Show file tree
Hide file tree
Showing 12 changed files with 514 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Deploy documentation

on:
# push:
# branches: ["main"]
push:
branches: ["main"]
workflow_dispatch:

jobs:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Todo.txt TUI

Todo.txt TUI is a highly customizable terminal-based application for managing your todo tasks. It follows the todo.txt format and offers a wide range of configuration options to suit your needs. Please note that the application may have some bugs as it's still under development, so your feedback and bug reports are greatly appreciated.
Todo.txt TUI is a highly customizable, terminal-based application for managing your tasks. It adheres to the Todo.txt format and provides a wide range of configuration options to meet your specific needs. Please note that the application is still under development and may contain bugs.

[Preview.webm](https://github.com/Fanteria/todo-tui/assets/28980012/11ab70e3-482c-4994-ac88-198953b08e39)
For detailed instructions on [installation](https://fanteria.github.io/todotxt-tui/installation.html) and [configuration](https://fanteria.github.io/todotxt-tui/configuration/index.html), refer to the [documentation](https://fanteria.github.io/todotxt-tui/about.html).

<video controls>
<source src="https://github.com/Fanteria/todo-tui/assets/28980012/11ab70e3-482c-4994-ac88-198953b08e39" type="video/webm">
</video>

## Feedback and Bug Reporting

Expand Down
7 changes: 5 additions & 2 deletions doc/about.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Todo.txt TUI

**Work in progress...**
Todo.txt TUI is a highly customizable terminal-based application for managing your todo tasks. It follows the [todo.txt](https://github.com/todotxt/todo.txt) format and offers a wide range of configuration options to suit your needs.

<video controls>
<source src="https://github.com/Fanteria/todo-tui/assets/28980012/11ab70e3-482c-4994-ac88-198953b08e39" type="video/webm">
</video>

<!-- It follows todo.txt format. -->
93 changes: 84 additions & 9 deletions doc/configuration/colors.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,96 @@
# Colors

**Work in progress...**
In Todo.txt TUI, you can customize the colors and text styles for various elements to suit your preferences. The customization options include setting foreground (`fg`) and background (`bg`) colors, as well as applying text modifiers to style the text.

In Todo.txt TUI, you can customize the colors and text styling for various elements. You have the flexibility to set foreground (`fg`) and background (`bg`) colors, as well as apply text modifiers for styling. Colors can be defined using color names, RGB values, or terminal index.
**Defining Colors**

You can apply text modifiers to change the style of text within Todo.txt TUI. Available text modifiers include:
You can specify colors in the following formats:

- `Bold`: Apply bold styling to the text.
- `Italic`: Apply italic styling to the text.
- `Underlined`: Apply underlined styling to the text.
- Named Colors: Use standard color names, e.g., `"Black"`, `"Red"`, etc.
- RGB Values: Use hexadecimal codes, e.g., `"#ff0000"` for red.
- Terminal Index: Use terminal color indices, e.g., `"9"` for bright red.

Here's an example of how to configure custom color and text modifiers for project `todo-tui` in your Todo.txt TUI application's TOML configuration:
**Applying Text Modifiers**

Modifiers allow you to style text with additional visual effects. Available modifiers include:

- `Bold`: Makes the text bold.
- `Italic`: Applies italic styling.
- `Underlined`: Underlines the text.

**Example Configuration**

To configure custom colors and text modifiers for the project `+todo-tui`, update your Todo.txt TUI application's TOML configuration file as follows:

```toml
[custom_category_style."+todo-tui"]
fg = "#ff0000" # Set foreground color to red using RGB values
bg = "Black" # Set background color to black
fg = "#ff0000" # Set foreground color to red (RGB value)
bg = "Black" # Set background color to black (named color)
modifiers = "Italic" # Apply italic styling
```

This configuration will style the text for `+todo-tui` with a red foreground, black background, and italicized text.

## Options

<dt><b>Flag:</b> <code>-A</code>, <code>--list-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_LIST_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>list_active_color</code></dt>
<dd>
Specifies the visual style used to highlight the currently active item in a list. This style helps you quickly identify the selected task.

**default:**
```toml
bg = "LightRed"
```
</dd>
<br>

<dt><b>Flag:</b> <code>-P</code>, <code>--pending-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PENDING_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>pending_active_color</code></dt>
<dd>
Specifies the text style for highlighting active tasks in the pending list. This overrides `list_active_color`.

</dd>
<br>

<dt><b>Flag:</b> <code>-D</code>, <code>--done-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_DONE_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>done_active_color</code></dt>
<dd>
Specifies the text style for highlighting active tasks in the completed list. This overrides `list_active_color`.
</dd>
<br>

<dt><b>Flag:</b> <code>--category-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CATEGORY_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>category_active_color</code></dt>
<dd>
Specifies the text style for highlighting active categories. This overrides `list_active_color`.
</dd>
<br>

<dt><b>Flag:</b> <code>--projects-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PROJECTS_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>projects_active_color</code></dt>
<dd>
Specifies the text style for highlighting active projects. This overrides `category_active_color`.
</dd>
<br>

<dt><b>Flag:</b> <code>--contexts-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CONTEXTS_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>contexts_active_color</code></dt>
<dd>
Specifies the text style for highlighting active contexts. This overrides `category_active_color`.
</dd>
<br>

<dt><b>Flag:</b> <code>--tags-active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_TAGS_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>tags_active_color</code></dt>
<dd>
Specifies the text style for highlighting active tags. This overrides `category_active_color`.
</dd>
<br>
53 changes: 52 additions & 1 deletion doc/configuration/file_worker.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# File worker

**Work in progress...**
<dt><b>Flag:</b> <code>--todo-path</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_TODO_PATH</code></dt>
<dt><b>Conf:</b> <code>todo_path</code></dt>
<dd>
Specifies the path to the `todo.txt` file that serves as the main task database. This file contains all your active tasks and is essential for managing your to-do list within the application.

**default:** `$HOME/todo.txt`
</dd>
<br>

<dt><b>Flag:</b> <code>--archive-path</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_ARCHIVE_PATH</code></dt>
<dt><b>Conf:</b> <code>archive_path</code></dt>
<dd>
Specifies the path to the `archive.txt` file, where completed tasks are stored. If not provided, completed tasks are moved to the `todo.txt` file instead of being saved in a separate archive file.
</dd>
<br>

<dt><b>Flag:</b> <code>-d</code>, <code>--autosave-duration</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_AUTOSAVE_DURATION</code></dt>
<dt><b>Conf:</b> <code>autosave_duration</code></dt>
<dd>
Defines the interval, in seconds, for automatic saving of changes to the `todo.txt` file. Is used only if `save_policy` is set to `AutoSave`.

**default:** `900`
</dd>
<br>

<dt><b>Flag:</b> <code>-f</code>, <code>--file-watcher</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_INIT_WIDGET</code></dt>
<dt><b>Conf:</b> <code>file_watcher</code></dt>
<dd>
Enables or disables the file-watcher functionality. When enabled, the application monitors the `todo.txt` (_and optionally `archive.txt`_) file for external changes and automatically reloads.

**default:** `true`
</dd>
<br>

<dt><b>Flag:</b> <code>-i</code>, <code>--save-policy</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_SAVE_POLICY</code></dt>
<dt><b>Conf:</b> <code>save_policy</code></dt>
<dd>
Determines the policy for saving changes to the todo.txt file and, optionally, the archive.txt file.

- `ManualOnly`: Requires explicit user action to save changes.
- `AutoSave`: Automatically saves changes at intervals defined by `autosave_duration.
- `OnChange`: Saves changes immediately whenever modifications occur.

**default:** `OnChange`

</dd>
<br>
65 changes: 59 additions & 6 deletions doc/configuration/hooks.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,65 @@
# Hooks

**Work in progress...**
<dt><b>Flag:</b> <code>--pre-new-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PRE_NEW_TASK</code></dt>
<dt><b>Conf:</b> <code>pre_new_task</code></dt>
<dd>
Path to the script executed before creating a new task. If none, no action is taken before a new task is created
</dd>
<br>

<dt><b>Flag:</b> <code>--post-new-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_POST_NEW_TASK</code></dt>
<dt><b>Conf:</b> <code>post_new_task</code></dt>
<dd>
Path to the script executed after creating a new task. If none, no action is taken after a new task is created
</dd>
<br>

<dt><b>Flag:</b> <code>--pre-remove-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PRE_REMOVE_TASK</code></dt>
<dt><b>Conf:</b> <code>pre_remove_task</code></dt>
<dd>
Path to the script executed before removing a task. If none, no action is taken before a task is removed
</dd>
<br>

<dt><b>Flag:</b> <code>--post-remove-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_POST_REMOVE_TASK</code></dt>
<dt><b>Conf:</b> <code>post_remove_task</code></dt>
<dd>
Path to the script executed after removing a task. If none, no action is taken after a task is removed
</dd>
<br>

<dt><b>Flag:</b> <code>--pre-move-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PRE_MOVE_TASK</code></dt>
<dt><b>Conf:</b> <code>pre_move_task</code></dt>
<dd>
Path to the script executed before moving a task. If none, no action is taken before a task is moved
</dd>
<br>

<dt><b>Flag:</b> <code>--post-move-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_POST_MOVE_TASK</code></dt>
<dt><b>Conf:</b> <code>post_move_task</code></dt>
<dd>
Path to the script executed after moving a task. If none, no action is taken after a task is moved
</dd>
<br>

<dt><b>Flag:</b> <code>--pre-update-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PRE_UPDATE_TASK</code></dt>
<dt><b>Conf:</b> <code>pre_update_task</code></dt>
<dd>
Path to the script executed before updating a task. If none, no action is taken before a task is updated
</dd>
<br>

<!--
<dt><b>Flag:</b> <code>-i</code>, <code>--init-widget</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_INIT_WIDGET</code></dt>
<dt><b>Conf:</b> <code>init_widget</code></dt>
<dt><b>Flag:</b> <code>--post-update-task</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_POST_UPDATE_TASK</code></dt>
<dt><b>Conf:</b> <code>post_update_task</code></dt>
<dd>
Path to the script executed after updating a task. If none, no action is taken after a task is updated
</dd>
<br>
-->
109 changes: 108 additions & 1 deletion doc/configuration/styles.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
# Styles

**Work in progress...**
<dt><b>Flag:</b> <code>--active-color</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_ACTIVE_COLOR</code></dt>
<dt><b>Conf:</b> <code>active_color</code></dt>
<dd>
Sets the color used to indicate the active window or element within the application. This provides a visual cue for the currently focused UI component.

**default:** `Red`
</dd>
<br>

<dt><b>Flag:</b> <code>--priority-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PRIORITY_STYLE</code></dt>
<dt><b>Conf:</b> <code>priority_style</code></dt>
<dd>
Defines the styles applied to tasks based on their priority levels.

**default:**
```toml
A.fg = "Red"
B.fg = "Yellow"
C.fg = "Blue"
```
</dd>
<br>

<dt><b>Flag:</b> <code>--projects-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_PROJECTS_STYLE</code></dt>
<dt><b>Conf:</b> <code>projects_style</code></dt>
<dd>
Specifies the text style for displaying projects within the task list. Projects are identified by their `+ProjectName` syntax.
</dd>
<br>

<dt><b>Flag:</b> <code>--contexts-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CONTEXTS_STYLE</code></dt>
<dt><b>Conf:</b> <code>contexts_style</code></dt>
<dd>
Sets the text style for displaying contexts in the task list. Contexts are identified by their `@ContextName` syntax.
</dd>
<br>

<dt><b>Flag:</b> <code>--hashtags-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_HASHTAGS_STYLE</code></dt>
<dt><b>Conf:</b> <code>hashtags_style</code></dt>
<dd>
Configures the text style for displaying hashtags in the task list. Hashtags are identified by their `#HashtagName` syntax.
</dd>
<br>

<dt><b>Flag:</b> <code>--category-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CATEGORY_STYLE</code></dt>
<dt><b>Conf:</b> <code>category_style</code></dt>
<dd>
Defines the default text style for displaying projects, contexts, and hashtags. This serves as the base style and is overridden by specific configurations for individual categories.
</dd>
<br>

<dt><b>Flag:</b> <code>--category-select-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CATEGORY_SELECT_STYLE</code></dt>
<dt><b>Conf:</b> <code>category_select_style</code></dt>
<dd>
Specifies the text style applied to categories when they are selected for filtering.

**default:**
```toml
fg = "Green"
```
</dd>
<br>

<dt><b>Flag:</b> <code>--category-remove-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CATEGORY_REMOVE_STYLE</code></dt>
<dt><b>Conf:</b> <code>category_remove_style</code></dt>
<dd>
Specifies the text style applied to categories that are filtered out from the view.

**default:**
```toml
fg = "Red"
```
</dd>
<br>

<dt><b>Flag:</b> <code>--custom-category-style</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_CUSTOM_CATEGORY_STYLE</code></dt>
<dt><b>Conf:</b> <code>custom_category_style</code></dt>
<dd>
Allows custom text styles to be applied to specific categories by name. Note: Custom styles defined here will override all other category-specific styles, including `category_style`, `category_select_style`, and `category_remove_style`

**default:**
```toml
"+todo-tui".fg = "LightBlue"
```
</dd>
<br>

<dt><b>Flag:</b> <code>--highlight</code></dt>
<dt><b>Env:</b> <code>$TODOTXT_TUI_HIGHLIGHT</code></dt>
<dt><b>Conf:</b> <code>highlight</code></dt>
<dd>
Specifies the text style for highlighting elements in the task list that match a search query.

**default:**
```toml
bg = "Yellow"
```
</dd>
<br>
2 changes: 1 addition & 1 deletion doc/configuration/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The title of the window when `todotxt-tui` is opened.
Defines the keybinds for window actions.

**Default:**
```plaintext
```toml
I = "InsertMode"
L = "MoveRight"
q = "Quit"
Expand Down
Loading

0 comments on commit 31232dd

Please sign in to comment.