Files
community-plugins/todo
5e7655dc73 Update nightwatch75/todo to 0.0.9 — drag-and-drop reorder (plugin API 5) (#91)
Manual-mode reordering now uses declarative drag-and-drop (ui.dragSource
/ ui.dropZone, plugin_api 5) instead of the two-click grip; also folds in
the 0.0.8 crash-loop fix (strike() gated on utf8.len) and an onExit
autosave flush. Translation keys nested for the validator.

Co-authored-by: nightwatch75 <nightwatch75@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 14:10:58 -04:00
..

To Do

A noctalia v5 bar plugin: a prioritised to-do list. Click the bar glyph to toggle a panel of task rows — add tasks with +, tick them off (the text is struck through), delete them, and set each task's priority. The list is kept sorted by priority and stored as a single JSON file; no external commands are run.

Plugin

Field Value
ID nightwatch75/todo
Entries Bar widget: todo; panel: panel

Usage

Add the todo widget from Noctalia's widget picker and click it to open the task panel. You can also open the panel directly or bind it in your compositor:

noctalia msg panel-toggle nightwatch75/todo:panel
Action Effect
Left click (bar glyph) Open/close the To Do panel
+ (panel header) Add a new task and start typing it
Sort toggle (panel header) Switch ordering between Priority and Manual
Colour chip (row) Cycle the task's priority: important → medium → low
☰ grip (row, manual only) Drag the row to a new position (reorder)
Click the text, or ✎ (pencil) Edit the task's text
Enter, or ✓ (row) Commit the edit — the row goes back to a static line
☐ / ☑ button (row) Toggle done/to-do (done tasks are struck through)
🗑 button (row) Delete the task

Priorities

Each task carries a priority, shown at the start of the row as a small coloured square. Click the square to cycle it. A legend at the foot of the panel maps each colour to its category:

Priority Colour
Important red
Medium amber
Low green

Ordering

The panel header carries a toggle that switches between two ordering modes; the choice is remembered.

  • Priority (default) — rows are sorted by priority: important first, then medium, then low. Changing a task's priority moves it into its new group but keeps its position relative to its peers; equal-priority rows are never reshuffled. No grips are shown.
  • Manual — rows keep the order you give them. Each row grows a ☰ grip on the left; here changing a priority only recolours the chip and never moves the row.

Priority mode is only a view: the stored order is always the manual one, so switching between the two modes (as often as you like) never loses your custom ordering.

Reordering in manual mode

Grab a row by its ☰ grip and drag it. Thin insertion zones open up between the rows as you drag; drop the row on one to move it there. This uses noctalia's declarative drag-and-drop, which needs plugin API ≥ 5.

Editing

Rows are static lines by default. Click a task's text (or its ✎ pencil button) to edit it; press Enter or the ✓ button to commit back to a static line. A new task (+) opens straight into edit mode — committing it while still empty simply discards it. Edits are also autosaved after a short idle pause and on close.

Tick a task (☐ → ☑) to complete it — its text is struck through until you un-tick it. The bar glyph's tooltip shows how many tasks are still to do.

Storage

Tasks live in one file, todo.json, inside the configured To Do folder (default ~/Documents/Todo). It is a small JSON object, { "version": 2, "sort": "priority" | "manual", "tasks": [ … ] }, where tasks is the array of { id, text, priority, done } objects (in manual order) — easy to read, hand-edit, sync, or back up. An older plain-array file is still read automatically. The plugin runs no external programs.

Settings

Setting What it does
To Do folder Where todo.json is stored (default ~/Documents/Todo).
Bar glyph The glyph shown for the widget on the bar.

Install

Install To Do from Noctalia's plugin store (Settings → Plugins), then add the widget to a bar from Settings → Bar. Plugin options live in Settings → Plugins.

For local development, add your working copy as a path source instead (.luau edits hot-reload):

noctalia msg plugins source add dev path /path/to/plugins
noctalia msg plugins enable nightwatch75/todo

Requirements

  • noctalia with plugin API ≥ 5 (declarative drag-and-drop)
  • No external dependencies

License

MIT.