71 lines
2.6 KiB
Markdown
71 lines
2.6 KiB
Markdown
# wat
|
||
|
||
`wat` is a terminal UI wrapper around [Watson](https://tailordev.github.io/Watson/) that lets you browse and launch timers via a keyboard-driven interface.
|
||
|
||
---
|
||
|
||
## Goals & Workflow
|
||
- Never type `watson start ...` again—start/stop timers with `Enter`.
|
||
- Maintain three panes simultaneously:
|
||
1. **Permanent Items** – curated recurring tasks defined in `state.yaml`.
|
||
2. **Recurring Items** – semi-regular tasks you hop between.
|
||
3. **Ad-Hoc Items** – last ~20 one-offs, automatically tracked.
|
||
- Highlight clearly when a timer is running (bold green) vs idle (yellow).
|
||
- Keep everything human-editable: YAML state/config under `~/.config/wat`.
|
||
|
||
---
|
||
|
||
## Key Features
|
||
- **Navigation**: `j/k` or arrows move within a pane; `h/l`, arrows, or `Ctrl+n/p` switch panes; `q` quits.
|
||
- **Timer control**: `Enter` toggles the selected item. Starting a different item automatically stops the previous timer.
|
||
- **New entries**: `n` launches a modal (task name + optional project tag). Item is added to the current pane.
|
||
- **Project reassignment**: `p` opens a modal to change the project tag for the selected item.
|
||
- **Log viewing**: `v` opens Watson's log viewer with daily/weekly/monthly views. Use `d`/`w`/`m` to switch periods, `j`/`k` to scroll.
|
||
- **Deletion**: `d` removes the selected entry; no noisy status message.
|
||
- **Config editing**:
|
||
- `Ctrl+e` edits task config (`state.yaml`).
|
||
- `c` edits app config (`config.yaml`).
|
||
- **Help overlays**: `?` for help, `c` inside help for config instructions.
|
||
|
||
---
|
||
|
||
## Files & Persistence
|
||
```
|
||
~/.config/wat/
|
||
├─ state.yaml # serialized AppState (items, selections, active timer)
|
||
└─ config.yaml # UI/app options (help hints, allowed projects, etc.)
|
||
```
|
||
- `state.yaml` and `config.yaml` use `serde_yaml` for readability.
|
||
|
||
---
|
||
|
||
## Building & Running
|
||
```
|
||
cargo build
|
||
cargo run
|
||
```
|
||
Requires `watson` on your `PATH` with a configured workspace.
|
||
|
||
---
|
||
|
||
## Keybindings (Summary)
|
||
| Keys | Action |
|
||
|------|--------|
|
||
| `j` / `k`, arrows | Move selection |
|
||
| `h` / `l`, arrows, `Ctrl+n` / `Ctrl+p` | Switch panes |
|
||
| `Enter` | Start/stop timer |
|
||
| `n` | New entry (task + optional project) |
|
||
| `p` | Reassign project for selected item |
|
||
| `v` | View Watson log (d/w/m for day/week/month) |
|
||
| `d` | Delete entry |
|
||
| `Ctrl+e` | Edit task config (`state.yaml`) |
|
||
| `c` | Edit app config (`config.yaml`) or show config help |
|
||
| `?` | Help screen |
|
||
| `q` | Quit |
|
||
|
||
---
|
||
|
||
## TODO / Follow-ups
|
||
- Add inline editing of permanent/recurring items instead of dropping to `$EDITOR`.
|
||
- Consider status messaging for critical errors (currently unused after deleting the delete confirmation).
|
||
- Add tests/snapshots for UI components.
|