Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit colors from the Zellij theme #12

Open
arexon opened this issue Sep 21, 2023 · 6 comments
Open

Inherit colors from the Zellij theme #12

arexon opened this issue Sep 21, 2023 · 6 comments
Labels
blocked enhancement New feature or request

Comments

@arexon
Copy link

arexon commented Sep 21, 2023

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
Copy link
Owner

dj95 commented Sep 21, 2023

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

@arexon
Copy link
Author

arexon commented Sep 21, 2023

I think configuring them by name would be the better option

@dj95 dj95 added the enhancement New feature or request label Sep 21, 2023
@dj95
Copy link
Owner

dj95 commented Sep 24, 2023

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
Copy link
Author

arexon commented Sep 24, 2023

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!

@MMukundi MMukundi mentioned this issue May 26, 2024
@dj95 dj95 added the blocked label Jun 20, 2024
@hrbtk
Copy link

hrbtk commented Jul 8, 2024

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

@dj95
Copy link
Owner

dj95 commented Jul 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants