Configuring¶
You’ll need to configure Todoman before the first usage, using its simple ini-like configuration file.
Configuration File¶
The configuration file should be placed in
$XDG_CONFIG_HOME/todoman/config.py
. $XDG_CONFIG_HOME
defaults to
~/.config
is most situations, so this will generally be
~/.config/todoman/config.py
.
- cache_path
The location of the cache file (an sqlite database). This file is used to store todo data and speed up execution/startup, and also contains the IDs for todos. If the value is not specified, a path relative to
$XDG_CACHE_HOME
will be used.$XDG_CACHE_HOME
generally resolves to~/.cache/
.- type
str
- default
"$XDG_CACHE_HOME/todoman/cache.sqlite3"
- color
By default todoman will disable colored output if stdout is not a TTY (value
auto
). Set tonever
to disable colored output entirely, oralways
to enable it regardless. This can be overridden with the--color
option.- type
str
- default
"auto"
- date_format
The date format used both for displaying dates, and parsing input dates. If this option is not specified the system locale’s is used.
- type
str
- default
"%x"
- default_command
When running
todo
with no commands, run this command.- type
str
- default
"list"
- default_due
The default difference (in hours) between new todo’s due date and creation date. If not specified, the value is 24. If set to 0, the due date for new todos will not be set.
- type
int
- default
24
- default_list
The default list for adding a todo. If you do not specify this option, you must use the
--list
/-l
option every time you add a todo.- type
str
- default
None
- default_priority
The default priority of a task on creation. Highest priority is 1, lowest priority is 10, and 0 means no priority at all.
- type
int
- default
None
- dt_separator
The string used to separate date and time when displaying and parsing.
- type
str
- default
" "
- humanize
If set to true, datetimes will be printed in human friendly formats like “tomorrow”, “in one hour”, “3 weeks ago”, etc.
If false, datetimes will be formatted using
date_format
andtime_format
.- type
bool
- default
False
- path
A glob pattern matching the directories where your todos are located. This pattern will be expanded, and each matching directory (with any icalendar files) will be treated as a list.
- type
str
- default
None, this field is mandatory.
- startable
If set to true, only show todos which are currently startable; these are todos which have a start date today, or some day in the past. Todos with no start date are always considered current. Incomplete todos (eg: partially-complete) are also included.
- type
bool
- default
False
- time_format
The date format used both for displaying times, and parsing input times.
- type
str
- default
"%X"
Sample configuration¶
The below example should serve as a reference. It will read ics files from any
directory inside ~/.local/share/calendars/
, uses the ISO-8601 date format,
and set the due date for new todos in 48hs.
# A glob expression which matches all directories relevant.
path = "~/.local/share/calendars/*"
date_format = "%Y-%m-%d"
time_format = "%H:%M"
default_list = "Personal"
default_due = 48
Color and displayname¶
You can set a color for each task list by creating a
color
file containing a color code in the hex format:#RRGGBB
.A file named
displayname
indicates how the task list should be named and is needed when there are multiple directories sharing a name, e.g.: when using multiple $CloudInstances. The default is the directory name.
Timezone¶
Todoman will use the system-wide configured timezone. If this doesn’t work for
you, you _may_ override the timezone by specifying the TZ
environment
variable.
For instruction on changing your system’s timezone, consult your distribution’s documentation.