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 settitle,showStatusandviewOptions.viewOptionsholds the options of the view, like{"status": "todo"}for atask-list. The views page lists the options of each view. - A split sets
arrangementand two or morechildren.side-by-sideplaces the children left to right andstackedplaces 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
| Key | Type | Default | Allowed | Description |
|---|---|---|---|---|
$schema | string | JSON schema reference for configuration validation | ||
tabs | array | The tabs in the order of the top bar. Keys 1 to 9 go to the first nine. | ||
tabs[].title | string | Required. The title of the tab in the top bar. Each tab has its own title. | ||
tabs[].layout | object | Required. The node that fills the tab: a tile or a split. | ||
tabs[].layout.arrangement | string | "side-by-side", "stacked" | How the split places its children. | |
tabs[].layout.children | array | The nodes of the split. Each child has the keys of a layout. | ||
tabs[].layout.view | string | "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.title | string | The title of the tile in its top border. Only a tile has a title. | ||
tabs[].layout.weight | number | 1 | above 0 | The 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.showStatus | boolean | true | Whether the tile shows the status of its view in its bottom border. Only a tile has a status. | |
tabs[].layout.viewOptions | object | The options of the view of the tile. Each view takes its own options. Only a tile has view options. | ||
refreshSeconds | object | The 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.tasks | number | 2 | minimum 0.1 | How often drg tui lists the tasks. |
refreshSeconds.drudgers | number | 2 | minimum 0.1 | How often drg tui reads the Drudgers as DRUDGE last recorded them. A read asks no sandbox. |
refreshSeconds.drudgerCheck | number | 30 | minimum 1 | How often drg tui checks the Drudgers with what drg drudger list does. |
refreshSeconds.sessions | number | 5 | minimum 0.1 | How 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.runlog | number | 1 | minimum 0.1 | How often drg tui reads what the run of a task shown in a runlog wrote since the last read. |
captureMouse | boolean | true | Whether 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. |