Skip to content

Add ui.theme config#96

Merged
lusingander merged 6 commits intolusingander:masterfrom
daewon:ui-theme-customization
Mar 8, 2026
Merged

Add ui.theme config#96
lusingander merged 6 commits intolusingander:masterfrom
daewon:ui-theme-customization

Conversation

@daewon
Copy link
Contributor

@daewon daewon commented Mar 6, 2026

Closes #95.

Summary

  • add [ui.theme] settings for selected row colors
  • add optional object_dir_bold
  • preserve the existing default styling when the config is unset

Validation

  • cargo fmt --all -- --check
  • cargo test -q
  • cargo clippy --all-targets --all-features -- -D warnings

preview

daewon added 4 commits March 6, 2026 17:51
- centralize list selection style resolution in ColorTheme
- reuse UiThemeConfig for directory item styling
- align list rendering tests with active/inactive selection behavior

Validated with cargo fmt --all -- --check, cargo test -q, and cargo clippy --all-targets --all-features -- -D warnings on stable.
@lusingander
Copy link
Owner

lusingander commented Mar 7, 2026

Thank you for your pull request.
However, it seems we need to discuss the implementation policy.

If you're interested in making the changes, I'd be happy if you could consider it.
Even if you're not interested, I'd like to implement this feature sometime soon if I get around to it.

@daewon
Copy link
Contributor Author

daewon commented Mar 7, 2026

@lusingander Thank you for the feedback.

I really enjoy using STU, and I think it is a wonderful applicatiton with a great TUI design.

I’ll try implementing it in the direction you suggested and update the PR.

@daewon
Copy link
Contributor Author

daewon commented Mar 7, 2026

@lusingander I updated the implementation in the direction you suggested.

  • Renamed ColorTheme to Theme
  • Deserialized [ui.theme] directly into Theme
  • Switched to Ratatui's Color serde support and removed the manual color parsing layer
  • Made the existing theme fields configurable
  • Moved object_dir_bold into Theme
  • Updated the docs and tests accordingly

I also simplified the structure a bit so the theme is now read directly from the config as the single source of truth.

If there are still points that should be revised, please feel free to let me know.

@lusingander
Copy link
Owner

Thank you, the content seems good. Could you please just check the format that's causing an error in CI?

@daewon
Copy link
Contributor Author

daewon commented Mar 8, 2026

I updated it accordingly.
It looks like the formatting got out of sync during the follow-up changes, so I fixed that as well.
If there are any other points that should be improved, please feel free to let me know.

@lusingander lusingander changed the title Add configurable list selection styling Add ui.theme config Mar 8, 2026
@lusingander lusingander merged commit 080d66d into lusingander:master Mar 8, 2026
5 checks passed
@lusingander
Copy link
Owner

lusingander commented Mar 8, 2026

Thank you for your contribution!

(The content of the changes was updated, so I just modified the pull request title.)

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.

Support configurable list selection colors and directory bold styling

2 participants