Skip to content

feat(color): add dark/light dual-theme config support#1219

Open
hugoh wants to merge 1 commit into
lsd-rs:mainfrom
hugoh:dark-light-theme-config
Open

feat(color): add dark/light dual-theme config support#1219
hugoh wants to merge 1 commit into
lsd-rs:mainfrom
hugoh:dark-light-theme-config

Conversation

@hugoh

@hugoh hugoh commented Jun 16, 2026

Copy link
Copy Markdown

Allow specifying separate theme files for dark and light terminal backgrounds:

  color:
    theme:
      dark: my-dark-colors
      light: my-light-colors

Either key is optional; omitting falls back to the built-in default for that mode. Existing string values (default, custom, legacy path) are unchanged.

Mode is determined by TERM_BACKGROUND=light (unset → dark). Resolves: TODO(zwpaper): check terminal color and return light or dark

I kept the detection logic with TERM_BACKGROUND to the minimum.


TODO

  • Use cargo fmt
  • Add necessary tests
  • Update README (if applicable)
  • Update config sample file in doc/samples (if applicable)
  • Update icon sample file in doc/samples (if applicable)
  • Update color sample file in doc/samples (if applicable)
  • Update man page at lsd/doc/lsd.md (if applicable)

Allow specifying separate theme files for dark and light terminal
backgrounds:

  color:
    theme:
      dark: my-dark-colors
      light: my-light-colors

Either key is optional; omitting falls back to the built-in default
for that mode. Existing string values (default, custom, legacy path)
are unchanged.

Mode is determined by TERM_BACKGROUND=light (unset → dark). Resolves:
TODO(zwpaper): check terminal color and return light or dark
@hugoh hugoh requested a review from zwpaper as a code owner June 16, 2026 23:57
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.

1 participant