write 0.5.0

A fullscreen, distraction-free, write-only Markdown editor that fades text away to silence the writer's inner editor.
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.5.0] - 2026-06-26

### Breaking Changes
- The `\` (backslash) key now opens the menu instead of inserting a literal backslash. To type a
  single literal backslash, press `\` twice (open the menu, then `\`).

### Added
- `\` (backslash) now opens the menu in addition to `Esc`, giving a leader-style command prefix
  (`\q` quit, `\w` windowed/fullscreen, `\d` darker mode).
- A `\\` menu action inserts a single literal backslash into the document, so the new leader key
  can still be typed as text.

### Changed
- The menu is now a two-column command/keybinding table (command on the left, key right-aligned),
  with the word-count header and all rows tinted in the primary green and the rows enlarged ~25%.
  Rows reflect current state (windowed↔fullscreen, normal↔darker).

### Fixed
- Holding or mashing `Backspace` at the deletion floor no longer continuously restarts the "no"
  wiggle each frame; the blocked-backspace wiggle is debounced so it plays one clean decay before
  it can re-trigger.
- After a screen-clear (second consecutive `Enter`), `Backspace` can no longer reach back into the
  just-cleared text — the deletion floor is advanced past the cleared content.

## [0.4.0] - 2026-06-26

### Added
- A clap-based command-line interface with `--help` and `--version`.
- `write edit` subcommand: open today's session file in `$VISUAL`/`$EDITOR`/`vi` without launching
  the TUI or taking the session lock.
- `write show` subcommand: print today's session file to stdout verbatim (prints nothing and exits 0
  when today's file doesn't exist).
- Each session now stamps a `## <datetime>` header into the day's file, splitting a day's writing
  into timestamped sessions.
- Bounded `Backspace`: you can walk back and fix a fresh typo, up to the last two words. Older text
  stays locked and permanent.
- A passive, non-blinking insertion-point cursor at the tail of the text.
- Visual feedback on the still-deletable tail: fresh (backspaceable) text shows in the primary
  green, while locked text is darkened.

### Changed
- `Backspace` now deletes — bounded to the last two words via file truncation, and never below the
  file's length when the session opened — instead of appending a space and clearing the screen.
  Hitting the deletion floor wiggles the text as "no" feedback.
- Text color is now green-primary: fresh text is bright green and older/locked text a darker green;
  the Esc-menu darker mode dims to a dim green rather than gray.
- The day's word count excludes `## ` session-header lines, so timestamps never inflate your total.

### Fixed
- Word count no longer miscounts ATX level-2 header lines as words.

## [0.3.0] - 2026-06-25

### Added
- A session-only "darker" mode you can toggle from the Esc menu by pressing `D`. It dims the text to
  a near-black gray for low-light writing; the menu shows a state-aware `D — darker` / `D — normal`
  hint. The setting resets each time you relaunch.

## [0.2.0] - 2026-06-24

### Added
- Persistent word-count HUD in the upper-right corner showing your running day total. It seeds from
  the existing content of today's file when you open the app and updates live as you write. Hidden
  until you have written at least two words; painted small and dim so it stays unobtrusive.
- Toggle between fullscreen and windowed mode from the Esc menu by pressing `W`; the menu shows a
  state-aware `W — windowed` / `W — fullscreen` hint.
- A brief horizontal "shake" of the visible text on a backspace-clear, as kinetic feedback that the
  wipe gesture registered.

### Changed
- The text column is now anchored to the vertical center of the window — the newest line sits just
  below center and older lines scroll up — instead of being anchored to the bottom.
- The Esc-menu word count and the new HUD share one day-total calculation, so the two always agree
  and match the seeded on-disk count.

### Fixed
- Pressing `W` to toggle windowed mode from the Esc menu no longer leaks a stray `w` into the
  document. egui delivered both the key and its text in the same frame; the menu close is now
  deferred until the whole event batch is processed.

## [0.1.1] - 2026-06-24

Initial release: a fullscreen, distraction-free, write-only Markdown editor that fades text away to
silence the writer's inner editor.

### Added
- Fullscreen, borderless, keyboard-only writing surface built on `egui`/`eframe`, with a black
  canvas and a single bottom-anchored column of text.
- The fading focus view: each glyph stays fully opaque for ~30 seconds, then fades out over ~1
  second and is pruned permanently. Older lines scroll off the top as you write.
- Append-only Markdown persistence to a per-day session file at
  `~/Documents/write/YYYY-MM-DD.md` (falling back to the home directory), flushed and `fsync`'d
  every ~30 seconds and on clean exit.
- Single-writer guarantee per day via an advisory file lock; a second instance for the same day
  exits quietly.
- Writing controls: `Enter` for a paragraph break and, when pressed twice, a visual screen clear;
  `Backspace` appends a space and clears the screen (never deletes); typed text is captured
  verbatim, including accents and dead keys.
- Key-driven `Esc` menu showing a live word count, with `Q` to quit and `Esc` to resume.
- Deferred macOS fullscreen that waits until the window gains focus, avoiding a launch-time
  activation race.