dj95 / zjstatus

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

Plugin does not appear on session start. Only appears after `serialization-interval` time. #24

Closed mike-lloyd03 closed 7 months ago

mike-lloyd03 commented 7 months ago

Describe the bug After updating to Zellij 0.39.1, the status line is not initially displayed after a session is started. After some time, the statusbar displays as normal.

To Reproduce Steps to reproduce the behavior:

  1. Update to Zellij 0.39.1
  2. Start a zellij session using this plugin

It appears that the amount of time it takes for the status bar to appear is the same as Zellij's session serialization frequency. Starting a session with just zellij, it will take 60 seconds for the status line to appear. 60 seconds is the new default session serialization frequency in 0.39.1. It was previously 1 second. Running zellij with zellij --serialization-interval 5, the statusline will appear after 5 seconds. With zellij --serialization-interval 20, it will appear after 20 seconds.

Expected behavior Plugin should load immediately as it did on Zellij 0.39.0.

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

Desktop (please complete the following information):

Layout

How does the layout look like? Please copy it into a code block.

layout {
    pane split_direction="vertical" {
        pane
    }

    pane size=1 borderless=true {
        plugin location="file:/home/mike/.config/zellij/plugins/zjstatus.wasm" {
            format_left  "{mode}#[fg=#1a1c23,bg=#4fa6ed,bold]{session}#[fg=#4fa6ed,bg=#1a1c23]{tabs}"
            format_right "#[fg=#1a1c23,bg=#4fa6ed,bold]{datetime}"
            format_space "#[bg=#1a1c23]"

            border_enabled  "false"

            hide_frame_for_single_pane "true"

            tab_normal              "#[fg=#000000,bg=#4C4C59] {index}  {name} #[fg=#4C4C59,bg=#1a1c23]"
            tab_normal_fullscreen   "#[fg=#000000,bg=#4C4C59] {index}  {name} Z #[fg=#4C4C59,bg=#1a1c23]"
            tab_normal_sync         "#[fg=#000000,bg=#4C4C59] {index}  {name} S #[fg=#4C4C59,bg=#1a1c23]"
            tab_active              "#[fg=#1a1c23,bg=#ffffff,bold] {index}  {name} #[fg=#ffffff,bg=#1a1c23]"
            tab_active_fullscreen   "#[fg=#1a1c23,bg=#ffffff,bold] {index}  {name} Z #[fg=#ffffff,bg=#1a1c23]"
            tab_active_sync         "#[fg=#1a1c23,bg=#ffffff,bold] {index}  {name} S #[fg=#ffffff,bg=#1a1c23]"

            datetime        "#[fg=#1a1c23,bg=#4fa6ed,bold] {format} "
            datetime_format "%A, %Y%m%d %H%M"
            datetime_timezone "America/Los_Angeles"

            mode_normal        "#[fg=#1a1c23,bg=#4fa6ed,bold]  NORMAL "
            mode_locked        "#[fg=#1a1c23,bg=#e55561,bold]  LOCKED "
            mode_resize        "#[fg=#1a1c23,bg=#e2b86b,bold]  RESIZE "
            mode_pane          "#[fg=#1a1c23,bg=#e2b86b,bold]   PANE  "
            mode_tab           "#[fg=#1a1c23,bg=#e2b86b,bold]   TAB   "
            mode_scroll        "#[fg=#1a1c23,bg=#e2b86b,bold]  SCROLL "
            mode_enter_search  "#[fg=#1a1c23,bg=#e2b86b,bold] ENTER SEARCH "
            mode_search        "#[fg=#1a1c23,bg=#e2b86b,bold]  SEARCH "
            mode_rename_tab    "#[fg=#1a1c23,bg=#e2b86b,bold] RENAME TAB "
            mode_rename_pane   "#[fg=#1a1c23,bg=#e2b86b,bold] RENAME PANE "
            mode_session       "#[fg=#1a1c23,bg=#e2b86b,bold] SESSION "
            mode_move          "#[fg=#1a1c23,bg=#e2b86b,bold]   MOVE  "
            mode_prompt        "#[fg=#1a1c23,bg=#e2b86b,bold]  PROMPT "
            mode_tmux          "#[fg=#1a1c23,bg=#8ebd6b,bold]   TMUX  "
        }
    }
}
mike-lloyd03 commented 7 months ago

Awesome thanks for the quick fix

dj95 commented 7 months ago

Hey,

the fix is available with the new release (0.9.1). Seems to work on my side. Hope this resolves the issue.