UI

Flag: -i, --init-widget
Env: $TODOTXT_TUI_INIT_WIDGET
Conf: init_widget
The widget that will be active when the application starts.
  • Possible values (flag, env): list, done, project, context, hashtag, preview
  • Possible values (config): List, Done, Project, Context, Hashtag, Preview
  • Default: List

Flag: -t, --window-title
Env: $TODOTXT_TUI_WINDOW_TITLE
Conf: window_title
The title of the window when `todotxt-tui` is opened.
  • Default: ToDo TUI

Flag: -W, --window-keybinds
Env: $TODOTXT_TUI_WINDOW_KEYBINDS
Conf: window_keybinds
Defines the keybinds for window actions.

Default:

I  = "InsertMode"
L  = "MoveRight"
q  = "Quit"
K  = "MoveUp"
"/" = "SearchMode"
S  = "Save"
u  = "Load"
H  = "MoveLeft"
J  = "MoveDown"
E  = "EditMode"

Flag: -R, --list-refresh-rate
Env: $TODOTXT_TUI_LIST_REFRESH_RATE
Conf: list_refresh_rate
Specifies the refresh rate for the UI when no keys are pressed. This is particularly useful if the to-do list is modified by a different program.
  • Default value: 5 seconds
  • The configuration can also specify nanoseconds for finer granularity.

Configuration Example:

[list_refresh_rate]
secs = 5
nanos = 0

Flag: -S, --save-state-path
Env: $TODOTXT_TUI_SAVE_STATE_PATH
Conf: save_state_path
The path to save the application's state (currently unused).

Flag: -l, --layout
Env: $TODOTXT_TUI_LAYOUT
Conf: layout
The layout setting allows you to define a custom layout for the application using blocks `[]`. You can specify the orientation of the blocks as either `Direction: Vertical` or `Direction: Horizontal`, along with the size of each block as a percentage or value. Within these blocks, you can include various widgets, such as:
  • List: The main list of tasks.
  • Preview: The task preview section.
  • Done: The list of completed tasks.
  • Projects: The list of projects.
  • Contexts: The list of contexts.
  • Hashtags: The list of hashtags.

Here's an example of a custom layout configuration:

[
    Direction: Horizontal,
    Size: 50%,
    [
        List: 50%,
        Preview,
    ],
    [ Direction: Vertical,
      Done,
      [
        Contexts,
        Projects,
      ],
    ],
]

This example creates a layout with a horizontal split, where the list takes up 50% of the width, and the preview occupies the remaining space. On the right side, there's a vertical split with the list of completed tasks, contexts, and projects.