zjstatus icon indicating copy to clipboard operation
zjstatus copied to clipboard

Inherit colors from the Zellij theme

Open arexon opened this issue 2 years ago • 7 comments

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!

arexon avatar Sep 21 '23 16:09 arexon

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

dj95 avatar Sep 21 '23 17:09 dj95

I think configuring them by name would be the better option

arexon avatar Sep 21 '23 18:09 arexon

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.

dj95 avatar Sep 24 '23 09:09 dj95

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!

arexon avatar Sep 24 '23 14:09 arexon

Is it possible to use more than 8 pallete colors like light/dark/bright red? Didn't find working solution for me 😢

hrbtk avatar Jul 08 '24 14:07 hrbtk

With the latest release (0.17.0) , I've implemented some improvements:

  • you can now specify e.g. bright_red to get the bright version of the color. Unfortunately there's no way for the dark version in the crate I used
  • you can now create color aliases (or just copy the colors from your zellij theme and prefix vars with color_). This way you can quickly change colors at one place

dj95 avatar Jul 15 '24 14:07 dj95