dj95 / zjstatus

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

First format specifier in {tabs} handler not applied #43

Closed ghost closed 4 months ago

ghost commented 4 months ago

Describe the bug When multiple format specifiers are added to a {tabs} handler, the first format is not applied.

To Reproduce Steps to reproduce the behavior:

  1. Add formatting for tab handlers in plugin configuration.
tab_normal  " [fg=#FFFFFF,bg=#181825] {name} "
tab_active  " [fg=#181825,bg=#FFFFFF] {name} "
  1. Launch Zellij

Expected behavior Both formatting should be applied; however foreground color is not applied.

Desktop (please complete the following information):

Layout

layout {
    default_tab_template {
        pane size=1 borderless=true {
            plugin location="file:plugins/zjstatus.wasm" {
                hide_frame_for_single_pane "true"

                format_left  "#[fg=#181825,bg=#A1BDCE,bold] {session} "
                format_center "{tabs}"
                format_space "#[bg=#181825]"

                tab_normal  " [fg=#FFFFFF,bg=#181825] {name} "
                tab_active  " [fg=#181825,bg=#FFFFFF] {name} "
            }
        }
        children
    }
    tab name="dev" focus=true {
        pane name="dev"
    }
    tab name="test" {
        pane name="test"
    }
}

Additional context Currently adding an additional format specifier at the start of the list as a workaround so the plugin can pick up on the foreground color.

tab_normal  " [bold,fg=#FFFFFF,bg=#181825] {name} "
tab_active  " [bold,fg=#181825,bg=#FFFFFF] {name} "
dj95 commented 4 months ago

Hey, thanks for your bug report. As far as I can see you are missing a # before the [ for your format specifier. That's why it isn't rendered. Can you try adding it?

ghost commented 4 months ago

Hey, that seems to have been the issue. Thanks for the help.