Releases: bmmmm/pwdtintii
Releases · bmmmm/pwdtintii
Release list
v0.5.1
Fixed
scripts/release.shis now a real dry-run: a preview (without--yes) no
longer edits the tracked files in place. It used to flip the CHANGELOG header
and bump VERSION/README on disk, leaving the tree dirty (and no[Unreleased]
header for a second pass) — so the very--yesthe dry-run pointed you to
aborted on the script's own clean-tree precondition. The preview now diffs the
proposed edits against the current files and writes nothing until--yes.- CI is green on GitHub Actions again: the bash/zsh
doctorparity test now
pinsTERM(runners leave it unset, where bash defaults todumband zsh
does not), with two runner-only test failures also fixed. (0.5.0's tag CI was
red, so its release job was skipped and no 0.5.0 GitHub Release exists — 0.5.1
is the first green-CI tag since.)
v0.4.0
Added
- fish shell support (
pwdtintii.plugin.fish, requires fish 3.5+) — a full
native port: resolves identical directory keys, families, shades, and registry
hashes as the bash/zsh plugins and emits byte-identical OSC-11 hex. Shares the
same per-dir PID registry, so a fish pane and a bash/zsh pane in the same
directory still get distinct shades. fzf commands (pt view, the picker, the
hub) forceSHELL=/bin/shso fzf's POSIX binds run correctly. Opt-in aliases
inexamples/aliases.fish; install is a manualsourceline. Pinned by a new
tests/fish.bats(19 tests) that compares fish output against bash. - tmux per-pane tinting — when
$TMUXis set, the tint is applied with
tmux select-pane -P "bg=#..."instead of the global OSC-11 sequence, keeping
each pane's color isolated (OSC 11 would colour the whole terminal, so multiple
panes in one window would fight over a single background).pt offresets the
pane style (bg=default). Known limitation: the fzf live-preview tint (while
the picker or viewer is open) still uses OSC 11 even inside tmux; the
steady-state prompt path is per-pane, and the background snaps back to per-pane
when the picker closes. pt view— a merged list+preview browser: an fzf picker over the families
with a colored preview pane thatctrl-tcycles through swatch and contrast
views across the dark and light palettes. Read-only — it previews;pt pick
pins. Reachable from theptmenu and asptview.- APCA in
pt contrast— each shade is now scored against the theme text in
APCA Lc alongside the WCAG ratio. The colored contrast view paints the scores
in each shade's best-readable foreground (the tone the engine recommends).
Changed
- The
pt pickandpt viewfzf menus are high-contrast over the live tint: the
family list is colored per-line (--ansi) in a tone that contrasts the tinted
background — light on the dark palette, dark on the light one — so actrl-t
toggle reflows the list in place and the focused row is a legible pill.
Previously the list inherited the terminal's ANSI foreground, with no
guaranteed contrast against the tint. - The
pt pickctrl-tdark/light toggle is flicker-free: it reloads the list,
preview, and header in place instead of restarting fzf (which redrew the whole
screen). - The
pthub menu adapts to the terminal width: the list pane is sized to its
widest action row so the glosses are no longer ellipsized, and the description
preview reflows to fill its pane instead of being hard-wrapped (the↳
markers). On a terminal too narrow to fit both side by side, the preview stacks
below the list so each keeps the full width.
Removed
scripts/preview.sh— the static palette dump is folded intopt view's
colored browser.pt previewstays as a back-compat alias forpt view.
Fixed
- The
ctrl-tdark/light flip inpt pickandpt viewnow repaints the
terminal background together with the list and swatches instead of lagging a
keystroke behind (the background used to catch up only on the next arrow key).
The live tint is routed through fzf's coordinatedexecute-silent, not a raw
OSC write during thetransform, which fzf's renderer dropped. - Closing the picker or viewer (ENTER/ESC) no longer flashes the terminal's
default background: fzf renders inline (sub-100% height), so its exit never
repaints the whole frame. - After a
ctrl-ttoggle to the other group, committing a pick no longer
disables thectrl-ttoggle on the nextpt pick. The plugin compares palette
paths by inode (-ef, matching the CLI), so a committedPWDTINTII_PALETTEin
abin/..or symlinked form is still recognized as the bundled palette. - The prompt hook preserves
$?, so a prompt that shows the last command's exit
status (zsh%?, or a bash prompt reading a captured$?) is no longer reset
to success on every command by the background emit. - A
PROMPT_COMMANDarray (bash 5.1+) no longer double-registers the hook and
emits OSC 11 twice per prompt — the install now scans every element. - A custom palette or overrides file without a trailing newline keeps its last
row instead of silently dropping it. - The zsh plugin runs cleanly under a user's
setopt nounset, matching the bash
plugin underset -u.
v0.3.0
Added
- Public GitHub mirror at github.com/bmmmm/pwdtintii — one-way Forgejo→GitHub
push-mirror, so the project can now be cloned from GitHub. pt off— actually stops tinting: resets the terminal background to its
default (OSC 111) and makes the prompt hook a no-op until re-enabled via
pt pick/pt auto/pt reload. Previouslyoffwas only an alias for
auto/unpin and kept tinting by directory.pt doctor— reports the setup (hash command, fzf, python3, palette,
terminal) and probes OSC 11 support live, surfacing the otherwise-silent
failure mode of a terminal that ignores OSC 11. The python3 line flags when
pt contrastis unavailable for lack of its only dependency.- Install via a plugin manager (oh-my-zsh / zinit / antidote), documented in the
README — thepwdtintii.plugin.zshnaming already followed the convention. - macOS coverage in CI (
macos-latest) — exercises the BSDstat -f/shasum
/ BSD-awk / brew-bash path the project is built around, which the Linux-only
job never touched — plus a release job that cuts a GitHub Release from the
matching CHANGELOG section onv*tags. - Light-theme palette (
palettes/light.tsv) — a pale, high-luminance variant
for light terminal themes. It mirrorsdefault.tsv's families and order, so a
given directory keeps its hue and only the lightness flips; activate it with
PWDTINTII_PALETTE=~/.local/share/pwdtintii/palettes/light.tsv. Derived from
default.tsvbyscripts/gen-light-palette.py(hue preserved, shades placed
on a WCAG-luminance ladder) and verified readable against dark text. - Dark/light toggle in the
pt pickpicker —ctrl-tflips between the
dark and light family groups so both stay reachable without listing all of
them at once; committing a pick from a group switches this shell to that
group's palette. No persisted state: it is scoped to the running shell, and an
explicitPWDTINTII_PALETTEin your rc still sets the startup default.
Changed
ptnow self-heals a stale shell: when the plugin file changed on disk since
the shell sourced it, the nextptre-sources the plugin before dispatching
(carrying over the pinned family, shade, and disabled state) and prints a
one-line notice — instead of only flagging "plugin changed — re-source" and
leaving the re-source to you. Re-sourcing is safe to repeat: the prompt hook
registration dedupes and runtime state lives in globals the load path preserves.- CI consolidated into a single
.github/workflows/ci.yml, read by both
Forgejo (source of truth) and GitHub (mirror); the.forgejo/copy was
removed.actions/checkoutis pinned to v4 (node20) so the act-based Forgejo
runner, which has no node24 runtime for checkout@v5, runs it too. - Install URL and copyright now reference the public GitHub identity.
- Prompt hot-path: the directory key is cached by
$PWD, skipping the per-prompt
subshell fork + git-root stat-walk while the directory is unchanged (a fresh
git initin the current dir is picked up on the nextcd). scripts/contrast-check.shis now theme-aware: a light-background palette is
checked against dark text instead of light (theme auto-detected from mean
luminance, or forced with adark/lightsecond argument).scripts/preview.sh
shows each shade against both a light and a dark text sample, so the dump is
legible whichever palette it dumps.- The
pt pickfzf preview pane is now high-contrast on every shade: the sample
text and the shadeN/hex label pick a dark tone on a light band and a light tone
on a dark one (per-band perceived luminance), so the labels stay legible on the
palelight.tsvswatches reached viactrl-t, not just on the dark default. - The live focus background (the terminal tint while you arrow through the
picker) is now theme-aware: a dark palette still dims the darkest shade toward
black, but a light palette lifts the lightest shade toward white instead of
darkening — so on a light terminal theme the hovered background no longer drops
to a dark tone under your dark text, while the swatches still stand out. The
darkest/lightest shade is chosen by perceived luminance, not palette position,
so a palette that orders its shades light-to-dark still tones the right one.
Fixed
- Palette loading validates that each family has four
#rrggbbshades and skips
any malformed row with a warning, instead of storing it and silently emitting
nothing on that family. - A self-reload (
ptre-sourcing a changed plugin) no longer double-registers
the bash prompt hook. The append now sits behind a one-shot flag, so a
PROMPT_COMMANDthat a framework has reformatted (spaced-out;separators)
can't slip past the substring dedupe guard and getpwdtintii_applyappended
twice — which would emit OSC 11 twice per prompt. zsh was already immune
(add-zsh-hookdedupes by membership). - A self-reload now parse-checks the plugin (
bash -n/zsh -n) before
sourcing it, so a reload triggered mid-edit (the file saved half-written) keeps
the running definitions and reports the failure, instead of partially
redefining the plugin while still looking like it succeeded. bin/pwdtintiirejects a malformed shade in a custom palette — the CLI reads
the palette unvalidated, unlike the plugin loader — instead of crashing the
16#hex arithmetic underset -e.
v0.2.0
Added
ptentry point — bareptopens an fzf action menu listing every
command (with a live description in the preview pane); selecting one runs it.
The menu loops: display-only actions (list,preview,contrast) pause
afterwards — q quits the hub, any other key (including arrow keys) returns to
the menu. ESC steps back one level: out of the family picker into the menu,
out of the menu to the shell. The header shows the current family/shade, and
flags a stale shell when the plugin file has changed on disk since it was
sourced (pt helpnotes it too).pt <cmd>dispatches directly:pick,
list,auto,reload,preview,contrast,help. Without fzf, bare
ptprints a cheat-sheet.bin/pwdtintii actions/describe-actionexpose the action catalog — the
single source of truth the shell dispatcher re-runs, so menu and dispatch
cannot drift (guarded by a test).pwdtintii_pick --autoclears a pinned family and returns to auto mode.- bats test harness (
tests/) coupling the bash and zsh plugins, plus a
Forgejo CI workflow (shellcheck,zsh -n, bats).
Changed
- The
ptalias now points at the dispatcher (waspwdtintii_apply, a
visual no-op);ptpick/ptlist/… remain as direct accelerators. - Steady-state prompts (same directory) skip all subprocess work and only
re-emit, cutting ~6 forks per prompt down to the key lookup. - README rewritten compact, with screenshots of the action hub and the live
family picker (docs/).
Fixed
- fzf preview height — the family preview now stretches to fill the pane
(FZF_PREVIEW_LINES) instead of a fixed ~18 lines that left the lower half
empty and pushed the fourth shade behind a scrollbar. - live focus tone — hovering a family in the picker emitted shade2 as the
background, so the shade2 swatch vanished into it; it now emits a dimmed
family tone (shade0 × 50%), darker than all four shades, so each stays
distinct. - emit under
set -e—emit-familyno longer aborts when there is no
controlling/dev/tty(the failed redirect is fully contained). - CLI help leak —
pwdtintii help(the CLI) printedset -euo pipefail
from the source below the doc block; it now stops at the first blank line. - fzf picker cancel — pressing ESC no longer captured the restore OSC
sequence into a variable; the picker now returns only the family and the
caller restores the background, so cancel correctly reverts the tint. - zsh
sha1sumfallback — the zsh plugin hardcodedshasumand broke on
Linux systems that only shipsha1sum; it now detects either at load (and
fails loudly if neither is present), matching the bash plugin and the docs. - bash key drift — directories outside
$HOMEcollapsed to the whole path
in bash but the first component in zsh; bash now also uses the first
component, so both shells tint the same directory identically. - cross-shell registry hash — zsh hashed the key with a trailing newline
(print -r) while bash did not (printf), so the two never shared a shade
registry; zsh now usesprint -rn. - empty palette — a palette with no families caused a division-by-zero on
every prompt;applyis now a no-op and load warns once. - menu bounds — choice
0in the numbered picker selected the last family
via bash negative indexing; out-of-range input is now rejected, and a
leading-zero choice (08,09) no longer trips bash octal parsing. - root path — applying at the filesystem root (
/, empty project name) no
longer leaks abad array subscripterror to the bash prompt. - registry race — the read-modify-write is now guarded by a
mkdirlock
(bounded, fail-open) so shells starting concurrently in the same dir don't
clobber each other's shade. - bash symlink resolution —
_pwdtintii_selfnow follows symlinks, so the
plugin works when sourced via a symlink. - registry
.ttemp files are cleaned up and emptied registries removed. - OSC 11 emission validates the hex before emitting (no escape injection from a
malformed palette).
v0.1.0
Added
- zsh plugin (
pwdtintii.plugin.zsh) withprecmd-driven OSC 11 emission. - bash 4+ plugin (
pwdtintii.plugin.bash) withPROMPT_COMMANDhook. - 37-family palette (
palettes/default.tsv) covering cool/warm/earth/neutral tones. - Per-key PID-tracked shade registry — splits in the same dir get distinct shades.
pwdtintii_pickwith fzf-based live-preview picker, numbered-menu fallback.pwdtintii_list/pwdtintii_reload/pwdtintii_applypublic functions.bin/pwdtintiiCLI for the fzf preview pane.scripts/preview.sh— visual palette dump.scripts/contrast-check.sh— WCAG check for fg/bg combos.examples/aliases.{zsh,bash}— opt-in short aliases (pt,ptpick, …).examples/overrides.tsv— example named-overrides config.- Apache-2.0 license.