Skip to content

v2.33.0: TUI color themes for light and dark terminals

Choose a tag to compare

@jdx jdx released this 01 Nov 10:33
· 31 commits to main since this release
Immutable release. Only release title and notes can be modified.
b7dd1e9

The TUI now uses colors from your terminal's own palette by default, so it is readable on both light and dark terminals. You can also pick built-in or custom themes. This release also fixes a Linux race that could make daemons with port or ready_port fail to start when several daemons start together.

Added

  • TUI color themes (#1082) by @dohzya and @jdx. The TUI used to hardcode RGB colors, white text and near-black backgrounds, which made it hard to read on light terminals.

    • The new default theme, auto, uses only the terminal's ANSI palette and does not set a background. The cursor row is bold and underlined, and rows selected with Space are italic, instead of being highlighted with a background color.
    • Built-in themes: catppuccin_latte, catppuccin_frappe, catppuccin_macchiato and catppuccin_mocha. These themes paint the whole screen background.
    • You can define custom themes under [themes.<name>] in any config file. A custom theme only needs the keys it changes from its base, which can be auto (the default) or any other theme. Colors can be #rrggbb, ANSI names such as red or bright_black, reset, or a palette index from 0 to 255. pitchfork reports invalid colors, unknown themes and base cycles when the TUI starts.
    • With theme = "auto", you can set light_theme and dark_theme to choose a theme based on the terminal's background. pitchfork asks the terminal for its background color when the TUI starts, and falls back to auto if the terminal doesn't answer.
    [settings.tui]
    light_theme = "catppuccin_latte"
    dark_theme = "catppuccin_mocha"
    
    # or pin one theme:
    # theme = "mine"
    
    [themes.mine]
    base = "catppuccin_latte"
    selection_bg = "#ddd6fe"

    New settings: tui.theme (default auto, or set PITCHFORK_TUI_THEME), tui.light_theme and tui.dark_theme (both empty by default).

Changed

  • The TUI's default look has changed (#1082). The old fixed RGB colors are no longer the default because auto follows your terminal's colors. The pitchfork title is now two colors (orange pitch, red fork) instead of a gradient, so it can follow the active theme. If you want a fixed palette, set tui.theme to one of the Catppuccin themes.

Fixed

  • Linux: daemons with port or ready_port no longer fail to start when nothing is using the port (#1086) by @neilconway. This could happen when several daemons started at once and failed with port ... is already in use on 127.0.0.1, but no process holding it could be found. The cause was the port-availability check. It could race with child processes the supervisor was starting at the same time, and those children briefly held a copy of the check's socket. On Unix, the check now binds the port without listening, so these copies no longer block it. Ports that are actually in use are still detected.

New Contributors

Full Changelog: v2.32.4...v2.33.0

💚 Sponsor pitchfork

pitchfork is built and maintained by @jdx, an open source developer at entire.io, the title sponsor of his open source work.

If pitchfork has a place in your development workflow, please consider becoming an individual or company sponsor. Your support funds ongoing development and helps keep pitchfork fast, free, and independent.