Skip to content

feat: custom themes, layout/threshold/icon options, presets, credit - #2

Merged
mr-kumuditha merged 2 commits into
mainfrom
feat/theme-customization
Sep 1, 2026
Merged

mr-kumuditha merged 2 commits into
mainfrom
feat/theme-customization

Conversation

@mr-kumuditha

Copy link
Copy Markdown
Owner

All new behavior is opt-in; a config with none of the new keys renders byte-for-byte as before. Bumps version 1.3.0 -> 1.4.0 across all manifests.

  • DPS_THEME=custom: per-role colors from DPS_COLOR_* (17 keys), each falling back to the default theme when unset.
  • DPS_TRUECOLOR=1: DPS_COLOR_* may be 6-digit hex on the custom theme, converted to 24-bit ANSI. Built-in themes untouched. A hex value with truecolor off falls back rather than printing a bare string.
  • DPS_THRESHOLD_MID / DPS_THRESHOLD_HIGH: configurable bar color-switch points (default 50 / 80), validated as ints 0-100 with MID < HIGH.
  • DPS_LAYOUT (default "ctx,5h,7d,over"): line 2 is assembled by walking this list; unknown names are skipped silently. Default order output is unchanged.
  • Terminal-width awareness in cmd_render: when width is known (COLUMNS or tput cols on a tty) and narrow, drop the effort segment, then the org badge, then shrink DPS_BAR_WIDTH. Unknown width -> unchanged behavior.
  • dps theme save/use/list: named presets under $CONFIG_DIR/presets/; names restricted to [A-Za-z0-9_-]; use loads via the safe parser.
  • DPS_ICONS=1: Nerd Font glyph labels instead of plain ctx/5h/7d/over.
  • Developer credit "DevPilot Studio — built by tharinda.dev" printed once by dps version/help, setup.sh, install.sh, and the npx installer; never on the render path.
  • DPS_SHOW_CREDIT=1 (default 0): dim "· tharinda.dev" appended to line 1 after the cost segment. Installers mention it; nothing enables it.

Config parser/writer are now driven by one DPS_CONFIG_KEYS allowlist; values are still never interpreted as code.

All new behavior is opt-in; a config with none of the new keys renders
byte-for-byte as before. Bumps version 1.3.0 -> 1.4.0 across all manifests.

- DPS_THEME=custom: per-role colors from DPS_COLOR_* (17 keys), each
  falling back to the default theme when unset.
- DPS_TRUECOLOR=1: DPS_COLOR_* may be 6-digit hex on the custom theme,
  converted to 24-bit ANSI. Built-in themes untouched. A hex value with
  truecolor off falls back rather than printing a bare string.
- DPS_THRESHOLD_MID / DPS_THRESHOLD_HIGH: configurable bar color-switch
  points (default 50 / 80), validated as ints 0-100 with MID < HIGH.
- DPS_LAYOUT (default "ctx,5h,7d,over"): line 2 is assembled by walking
  this list; unknown names are skipped silently. Default order output is
  unchanged.
- Terminal-width awareness in cmd_render: when width is known (COLUMNS or
  tput cols on a tty) and narrow, drop the effort segment, then the org
  badge, then shrink DPS_BAR_WIDTH. Unknown width -> unchanged behavior.
- dps theme save/use/list: named presets under $CONFIG_DIR/presets/;
  names restricted to [A-Za-z0-9_-]; use loads via the safe parser.
- DPS_ICONS=1: Nerd Font glyph labels instead of plain ctx/5h/7d/over.
- Developer credit "DevPilot Studio — built by tharinda.dev" printed once
  by dps version/help, setup.sh, install.sh, and the npx installer;
  never on the render path.
- DPS_SHOW_CREDIT=1 (default 0): dim "· tharinda.dev" appended to line 1
  after the cost segment. Installers mention it; nothing enables it.

Config parser/writer are now driven by one DPS_CONFIG_KEYS allowlist;
values are still never interpreted as code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mr-kumuditha
mr-kumuditha marked this pull request as ready for review September 1, 2026 06:31
Co-authored-by: mr-kumuditha <140329762+mr-kumuditha@users.noreply.github.com>
@mr-kumuditha
mr-kumuditha merged commit 43b5aa4 into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants