dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
490 stars 11 forks source link

Datetime only supports one theme formatting hint #40

Closed mrdgo closed 9 months ago

mrdgo commented 9 months ago

Describe the bug A clear and concise description of what the bug is. The field datetime in the config appears to only support one theming hint. So if I add a fancy special character with inverted color to match the style, the date doesn't get rendered correctly and instead the #[bg=#...,fg=#...] is rendered in the status bar.

To Reproduce Steps to reproduce the behavior:

  1. use multiple #[] theme hints to the datetime field
  2. start zellij with zjstatus and the from 1. resulting config

Expected behavior I would have expected that the date is formatted with my desired colors.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Layout

datetime "#[fg=#98971a,bg=#161616] #[bg=#98971a,fg=#161616]{format} "

it renders as

 #[bg=#98971a,fg=#161616] Monday ...
dj95 commented 9 months ago

Hi,

thanks for your bug report. As for now, this is intended behaviour, since you can only provide the date/time format in this widget and nothing else. For your purpose, you could add the starting section (#[fg=#98971a,bg=#161616]) right before the date widget in format_left or format_right. Is this a feasible option?

mrdgo commented 9 months ago

I see. yeah sure - that's a reasonable workaround :)