diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-03 15:42:40 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-03 15:42:40 +0200 |
| commit | eb35acda4207392c10b4b1192b3b057bcad99a47 (patch) | |
| tree | c962e91fc502ec57d92df386e773033fe42fd17b /README.md | |
| parent | afd20c9527fa77ba60901707c7bc73b2af926a67 (diff) | |
| parent | f62ced3c2c85675e746bff7ef8aca5c75c9737e0 (diff) | |
| download | qtmaildir-eb35acda4207392c10b4b1192b3b057bcad99a47.tar.gz qtmaildir-eb35acda4207392c10b4b1192b3b057bcad99a47.zip | |
Merge branch 'feature/qaction-menus'
Menus, a toolbar and a generated shortcut reference, built on converting
the action registry from a hash of callbacks to QActions. Along the way:
three default key bindings that had never fired, a shortcut dialog taller
than the screen, thread list columns that could not be resized, no visible
feedback that a tag action had landed, and a tags column so wide it was
unreadable.
Backlog items 3, 8, 9, 13 and 14 done; 11 partly.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 90 |
1 files changed, 66 insertions, 24 deletions
@@ -91,6 +91,8 @@ name = Your Name address = you@example.org maildir = work-mail ; relative to notmuch's database.path drafts = Drafts ; recorded for v2; unused today +label = W ; optional chip text; defaults to the key +color = #2f6fa8 ; optional chip colour; generated when unset [account.personal] name = Your Name @@ -98,57 +100,97 @@ address = you@example.net maildir = personal drafts = Drafts +[tagcolors] +; Optional. Colours resolve by exact tag first, then by top-level prefix, so +; one entry covers a whole hierarchy. +shopping = #3366cc ; also colours shopping/amazon, shopping/nike, ... +shopping/amazon = #ff9900 ; ... unless the exact tag overrides it +work = #cc4444 + [queries] Inbox = tag:inbox Unread = tag:unread Flagged = tag:flagged [keys] +Ctrl+E = archive +Ctrl+D = delete j = next_thread k = prev_thread -Return = open_thread -a = archive -d = delete -N = toggle_unread -F = flag -/ = focus_query -h = toggle_html -u = undo -G = sync -Ctrl+Q = quit ``` Saved-query buttons appear in alphabetical order rather than file order: QSettings returns keys sorted, and preserving file order would mean hand-rolling an INI parser. +## Tags + +Tags render as coloured chips, and fall into two kinds. + +**Account tags** (`account-<key>`, matching an `[account.<key>]` stanza) say +which mailbox a thread arrived in. They appear as a chip in front of the +subject in the thread list, coloured by that account's `color` key and labelled +by its `label` key. `label` changes the chip text only; the notmuch tag is +never renamed, so queries and external tagging are unaffected. + +**Functional tags** say what state a thread is in. They fill one row under the +message pane, sorted, with whatever does not fit collapsing into a `+N` chip +whose tooltip lists the rest. Colours come from `[tagcolors]`, falling back to +built-in defaults for the usual state tags (`flagged`, `unread`, `deleted`, +`spam`, `attachment`, `replied`, and others), and finally to a colour derived +from the tag name so no chip is ever unstyled. + +Lookup is exact tag first, then top-level prefix. One `shopping` entry +therefore covers `shopping/amazon` and `shopping/nike`, while a +`shopping/amazon` entry still overrides its own. + +Note that a `/` in an INI key is a group separator to QSettings, so +`shopping/amazon = #ff9900` is stored as a nested key and written to the file +as `shopping\amazon`. It is read back correctly; the escaping is QSettings' +own. + ## Keybindings Defaults, all rebindable through `[keys]`: | Key | Action | Does | |---|---|---| -| `j` | `next_thread` | Select the next thread | -| `k` | `prev_thread` | Select the previous thread | +| `Ctrl+J` | `next_thread` | Select the next thread | +| `Ctrl+K` | `prev_thread` | Select the previous thread | | `Return` | `open_thread` | Focus the thread list | -| `a` | `archive` | Remove `inbox` from every selected thread | -| `d` | `delete` | Add `deleted` | -| `N` | `toggle_unread` | Toggle `unread` | -| `F` | `flag` | Add `flagged` | -| `/` | `focus_query` | Focus and select the query bar | -| `h` | `toggle_html` | Switch the thread between HTML and plain text | -| `u` | `undo` | Undo the last tag change | -| `G` | `sync` | Run the configured sync command | +| `Ctrl+E` | `archive` | Remove `inbox` from every selected thread | +| `Ctrl+D` | `delete` | Add `deleted` | +| `Ctrl+Shift+S` | `spam` | Add `spam`, remove `inbox` | +| `Ctrl+U` | `toggle_unread` | Toggle `unread` | +| `Ctrl+I` | `flag` | Add `flagged` | +| `Ctrl+L` | `focus_query` | Focus and select the query bar | +| `Ctrl+H` | `toggle_html` | Switch the thread between HTML and plain text | +| `Ctrl+M` | `load_remote` | Load remote images for the current thread | +| `Ctrl+Z` | `undo` | Undo the last tag change | +| `Ctrl+G` | `sync` | Run the configured sync command | | `Ctrl+Q` | `quit` | Quit | -Two further actions exist but have **no default binding**, so they are -unreachable until you bind them: `spam` (adds `spam`, removes `inbox`) and -`load_remote` (the keyboard equivalent of the "Load remote content" -button). +Every action now carries a default binding, and every one appears in a menu. +**Help > Keyboard shortcuts** lists the current bindings, generated from the +actions themselves, so it shows your overrides rather than these defaults. An unknown action name in `[keys]` produces a warning at startup rather than binding silently, so a typo is visible. +### Upgrading from 0.1.0 + +0.1.0 used single letters (`j`, `k`, `a`, `d`, `N`, `F`, `h`, `u`, `G`, `/`). +Those still work if you keep them in `[keys]`, and single letters remain safe +to bind: Qt suppresses a plain-letter shortcut while the query bar has focus, +so typing a query is unaffected. + +Three of the old defaults never actually fired. Typing a capital sends +`Shift`+the key, but `N`, `F` and `G` were stored as the unshifted key, a +combination no keystroke produces, so `toggle_unread`, `flag` and `sync` were +dead. A bare capital in `[keys]` is now read as `Shift`+that letter, which is +what you press, so those bindings work whether you keep the old names or move +to the new defaults. Note this makes `y` and `Y` two different keys. + Tag actions apply to **every selected thread**, not only the focused one. ## Security posture of the message view |
