<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ttym.git/patches, branch main</title>
<subtitle>simple, modular CLI timer and stopwatch written in C</subtitle>
<id>https://git.labunix.xyz/ttym.git/atom?h=main</id>
<link rel='self' href='https://git.labunix.xyz/ttym.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/ttym.git/'/>
<updated>2026-08-25T17:08:14Z</updated>
<entry>
<title>patches: drop generated config.h and binary sections from the diffs</title>
<updated>2026-08-25T17:08:14Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-25T17:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/ttym.git/commit/?id=168361ef112c61391a615d8b1f0048b79a2b7237'/>
<id>urn:sha1:168361ef112c61391a615d8b1f0048b79a2b7237</id>
<content type='text'>
The 3.0 patch files each carried a spurious diff section for config.h --
a file the Makefile generates from config.def.h -- plus "Binary files
a/timer and b/timer differ" noise. Applying any of them made patch(1)
stop and prompt "File to patch:", which stalls a non-interactive apply
and prints "1 out of 1 hunk ignored" otherwise.

Cause: the diff-generation step cleaned its scratch trees with a glob
that matched nothing, and the shell aborts the whole command line on a
failed glob, so the cleanup never ran and the build products were left
in place.

The resulting builds were correct either way, since make regenerates
config.h from config.def.h, but the patches were not clean. Each patch
now touches only ttym.c and config.def.h.

Verified with patch --batch &lt; /dev/null so a prompt is fatal rather than
silently skipped: all five apply with no prompt, skip, ignored hunk or
fuzz, and compile.

Claude-Session: https://claude.ai/code/session_01APLBs8RB1FcUaC4viVkzbP
</content>
</entry>
<entry>
<title>ttym 3.0: fix terminal and config bugs, fold terminal-only patches into base</title>
<updated>2026-08-25T17:02:35Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-25T17:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/ttym.git/commit/?id=8f99f1650e4a7363af1d83190b4082fb72a9f73f'/>
<id>urn:sha1:8f99f1650e4a7363af1d83190b4082fb72a9f73f</id>
<content type='text'>
Correctness fixes:
  - restore the terminal on SIGQUIT and SIGHUP. atexit never runs on an
    uncaught fatal signal, so Ctrl+\ left the cursor hidden and autowrap
    disabled.
  - drop the unconditional newline in restore_tty. Every run emitted a
    stray blank line, including piped output.
  - treat EINTR as an interruption rather than a poll() failure, which
    delayed Ctrl+C by up to one 100ms frame.

config-file patch:
  - make comment stripping quote-aware so a value may contain '#', and
    strip one matched pair of quotes. bar_fill = "#" was silently dropped,
    despite '#' being the glyph of the hash style this build ships.
  - resolve bar_fill/bar_empty inside resolve_bar and clear them on --bar,
    so command-line flags beat the config file as documented. Previously
    config glyphs silently overrode --bar.
  - report unknown keys, unparseable booleans and malformed lines on
    stderr. flash = enabled silently meant off.
  - never write to disk. --dump-config prints a commented template on
    stdout instead of the binary creating ~/.config/ttym/config on first
    run.

Patch set:
  - fold persist-alert, flash and bar-styles into the base. The base is
    now terminal-only: it opens /dev/tty, draws and exits, with no file
    writes and no subprocesses. Everything still in patches/ changes what
    the program touches.
  - seven patches become four; config-file's prerequisites drop from six
    patches to one (notify), so it is regenerable mechanically.
  - regenerate every patch. All apply with zero fuzz and compile.

Source:
  - rewrite argv in place rather than into a malloc'd copy (C99
    5.1.2.2.1), removing die(), four free() calls and &lt;stdarg.h&gt;.
  - fold the duplicated elapsed-time expression into elapsed().
  - drop dead code: have_any, (void)cfg, and an unreachable branch in
    parse_duration.
  - replace hand-counted padding with \033[K.

Docs and build:
  - timer.1: -c is the third hook argument, not the fourth. Add EXIT
    STATUS (a stopwatch always exits 130 -- it has no natural end) and
    ENVIRONMENT. Document config precedence and quoting.
  - wire VERSION into a dist target; it was defined and never used.
  - track .gitignore, which previously ignored itself, so a fresh clone
    had no ignore rules.

Claude-Session: https://claude.ai/code/session_01APLBs8RB1FcUaC4viVkzbP
</content>
</entry>
<entry>
<title>initial commit</title>
<updated>2026-05-20T12:23:09Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-05-20T12:23:09Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/ttym.git/commit/?id=9e3fcd953e7136b900d6aabafe1c64c083a927be'/>
<id>urn:sha1:9e3fcd953e7136b900d6aabafe1c64c083a927be</id>
<content type='text'>
</content>
</entry>
</feed>
