Hi there! π
First off, thanks for building xleak β it's a really nice tool. Clean architecture, fast rendering, and the ColorScheme struct is beautifully designed.
I've been looking at the source and noticed a couple of features that would be relatively straightforward to add given how well the code is already structured. Wanted to check if you'd be open to contributions in these areas before I start work:
1. Custom Color Themes via config.toml
The existing ColorScheme struct (17 fields, cleanly decoupled from the Theme enum) maps almost 1:1 to a TOML table. This would let users define their own themes to match their terminal palette.
Example config (~/.config/xleak/config.toml):
[theme]
name = "tokyonight"
[theme.colors]
background = "#1a1b26"
foreground = "#c0caf5"
header_bg = "#24283b"
header_fg = "#7aa2f7"
selected_bg = "#33467c"
selected_fg = "#c0caf5"
border = "#565f89"
Implementation-wise, this would be ~150-200 lines β add serde derive to ColorScheme, a config loader, and a --theme CLI flag. The hard part (clean color abstraction) is already done.
2. Live Config Reload
With the existing 100ms event loop poll, adding a file watcher (via the notify crate) for the config file would be ~60-80 lines. When the config changes, reload the ColorScheme and the next render tick picks it up automatically. This is great for theme tweaking β edit the TOML, save, see the result instantly.
Both features are additive and wouldn't change any existing behavior β the built-in themes would remain as defaults.
Happy to submit a PR if you're interested! Would love to hear your thoughts on scope/approach before diving in.
Hi there! π
First off, thanks for building xleak β it's a really nice tool. Clean architecture, fast rendering, and the
ColorSchemestruct is beautifully designed.I've been looking at the source and noticed a couple of features that would be relatively straightforward to add given how well the code is already structured. Wanted to check if you'd be open to contributions in these areas before I start work:
1. Custom Color Themes via
config.tomlThe existing
ColorSchemestruct (17 fields, cleanly decoupled from theThemeenum) maps almost 1:1 to a TOML table. This would let users define their own themes to match their terminal palette.Example config (
~/.config/xleak/config.toml):Implementation-wise, this would be ~150-200 lines β add
serdederive toColorScheme, a config loader, and a--themeCLI flag. The hard part (clean color abstraction) is already done.2. Live Config Reload
With the existing 100ms event loop poll, adding a file watcher (via the
notifycrate) for the config file would be ~60-80 lines. When the config changes, reload theColorSchemeand the next render tick picks it up automatically. This is great for theme tweaking β edit the TOML, save, see the result instantly.Both features are additive and wouldn't change any existing behavior β the built-in themes would remain as defaults.
Happy to submit a PR if you're interested! Would love to hear your thoughts on scope/approach before diving in.