Jump to content

tui-do

From Hugo's wiki

tui-do is a task list and reminder for the terminal: the newest version of todo, which I've rewritten once per laptop I've owned.

  1. Add your tasks to a Lua file.
  2. Call the program with the time interval you want.
  3. Get stressed about overdue tasks and how close the next deadline is.

I call it from .bashrc with --quiet and --week, so it only shows up when there is something to do now.

How it works

Tasks live in a plain Lua file, by default ~/.config/<program-name>/config.lua, as a Tasks table of { name, desc, date } entries built with os.time. Every run:

  1. Loads the default file, plus any extra .lua files given on the command line, merging their tasks.
  2. Sorts and filters the tasks by date and flags.
  3. Prints them, colored unless --plain is set (overdue ones in red).
  4. Dumps the full merged list back to the default file.

So passing a one-off file once folds its tasks into the main list for good.

Usage

Command Shows
todo All tasks
todo --in 7 Tasks for the next 7 days
todo --week Tasks until Monday
todo --overdue Tasks already due
todo --new Create a template, open it in $EDITOR and load it
todo --edit Open the main file in $EDITOR

Building

$ make

Tested on Linux only. It is also available through the pm user repository.

Warning Dates are stored as a 32-bit int, so they overflow on 2038-01-19. Loading a later date fails with an error instead of corrupting data.

See also