Skip to content

TUI

The TUI config file is ~/.drudge/tui.json. It sets the tabs of drg tui and the layout of each tab. drg setup writes it when it is missing, with $schema and the bundled default layout, which the TUI page shows as JSON. An existing file is left alone, so the file is yours to edit. Without the file drg tui shows the bundled default.

drg tui reads the file when it starts. A file that does not parse, or that holds an unknown key, a layout DRUDGE cannot build or a view option the view refuses, stops drg tui with an error that names the file and the path of the value to change, like tabs[0].layout.children[1].weight.

Schema

The file starts with "$schema": "./schema/tui.json", a path relative to the file. It points at ~/.drudge/schema/tui.json, the local copy of the schema that drg setup rewrites on every run. An editor with JSON schema support uses it to complete keys and flag wrong values.

Layout

A layout is a tree of nodes. A node is a tile or a split.

  • A tile sets view, the thing it shows, and may set title, showStatus and viewOptions. viewOptions holds the options of the view, like {"status": "todo"} for a task-list. The views page lists the options of each view.
  • A split sets arrangement and two or more children. side-by-side places the children left to right and stacked places them top to bottom.

A split divides its space between its children by weight. A child with weight 2 gets twice the space of a child with weight 1.

Keys

KeyTypeDefaultAllowedDescription
$schemastringJSON schema reference for configuration validation
tabsarrayThe tabs in the order of the top bar. Keys 1 to 9 go to the first nine.
tabs[].titlestringRequired. The title of the tab in the top bar. Each tab has its own title.
tabs[].layoutobjectRequired. The node that fills the tab: a tile or a split.
tabs[].layout.arrangementstring"side-by-side", "stacked"How the split places its children.
tabs[].layout.childrenarrayThe nodes of the split. Each child has the keys of a layout.
tabs[].layout.viewstring"drudger-list", "task-board", "task-detail", "task-list", "task-runlog"What the tile shows. drudger-list: Lists the Drudgers of the project with what DRUDGE last saw of each. task-board: Shows the tasks of the project on a board with one column per status. task-detail: Shows the fields and the description of the task selected in a task list or a task board of the same tab. task-list: Lists the tasks of the project with the rows of drg task list. task-runlog: Shows the compact runlog of a task opened with L or selected in a task list or a task board of the same tab, and follows the run while it writes.
tabs[].layout.titlestringThe title of the tile in its top border. Only a tile has a title.
tabs[].layout.weightnumber1above 0The share of the space of its split the node takes, relative to the other children of the split. It may be a fraction.
tabs[].layout.showStatusbooleantrueWhether the tile shows the status of its view in its bottom border. Only a tile has a status.
tabs[].layout.viewOptionsobjectThe options of the view of the tile. Each view takes its own options. Only a tile has view options.
refreshSecondsobjectThe seconds between two runs of each feed. A tile runs only the feeds of what it shows. A run never starts while the last run of its feed is going. Each value may be a fraction, like 0.5.
refreshSeconds.tasksnumber2minimum 0.1How often drg tui lists the tasks.
refreshSeconds.drudgersnumber2minimum 0.1How often drg tui reads the Drudgers as DRUDGE last recorded them. A read asks no sandbox.
refreshSeconds.drudgerChecknumber30minimum 1How often drg tui checks the Drudgers with what drg drudger list does.
refreshSeconds.sessionsnumber5minimum 0.1How often drg tui checks the Sessions of the in-progress tasks and records the outcome of each finished one with what drg task status does.
refreshSeconds.runlognumber1minimum 0.1How often drg tui reads what the run of a task shown in a runlog wrote since the last read.
captureMousebooleantrueWhether drg tui captures the mouse. A click focuses a tile, switches tabs or moves the cursor, and the wheel scrolls the tile under the pointer. When it is false, the terminal keeps its native text selection.
Last updated on