dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
360 stars 6 forks source link

Inherit colors from the Zellij theme #12

Open arexon opened 9 months ago

arexon commented 9 months ago

Instead of configuring specific colors, users could pick from a pre-defined list of colors. zellij-tile has Palette which inherits colors from the Zellij theme.

Not a necessity but would be really nice!

dj95 commented 9 months ago

Sounds like a cool idea! Would you use them only in a preset as default or in the configuration by name?

arexon commented 9 months ago

I think configuring them by name would be the better option

dj95 commented 9 months ago

I've tried to implement this feature. Unfortunately the palette is only returned on specific events (e.g. ModeInfo). Colors and configuration in zjstatus is parsed when starting it, to improve the performance (imo it should not be necessary to reparse the config on each event). Therefore I need some time to think about a solution that will allow zjstatus to parse the colors, but not on each update.

In the mean time zjstatus will support terminal colors by name. Maybe this helps in one or another way to work around the missing feature.

arexon commented 9 months ago

I didn't dig too deep into how Zellij plugins work so I assumed the palette can be provided at startup. There's a new theme definition spec disscusion that might hopfully address this.

Thank you for implementing terminal colors support though!