wat/README.md
Ian Keane 353d422730 View filtering, task name refactor
Weird issues where projects were mapping to tags. Also group everything
by project in view with 'g'
2025-11-22 11:53:43 -05:00

71 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 (project + optional tag). Item is added to the current pane.
- **Project reassignment**: `p` opens a modal to change the tags for the selected item.
- **Log viewing**: `v` opens Watson's log viewer with daily/weekly/monthly views. Use `d`/`w`/`m` to switch periods, `g` to toggle grouping by date/project, `j`/`k` to select entries, `e` to edit, `x` to delete, `c` to copy to clipboard.
- **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 (project + optional tag) |
| `p` | Reassign tag for selected item |
| `v` | View Watson log (d/w/m period, g group, e edit, x delete, c copy) |
| `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.