aboutsummaryrefslogtreecommitdiffstats
path: root/sl0pstatus/src/lib.rs (follow)
Commit message (Collapse)AuthorAge
* sl0p(bar): draw the bar as a framed box, and a single line when collapseduser2026-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given three rows the bar now draws the same rounded box the panes do, so the bottom of the screen reads as one more pane instead of a strip of text under them. Given one row it stays the line it always was, which is what a terminal narrow enough to collapse the layout should spend on chrome. The height is the LAYOUT's decision, because a plugin cannot resize its own pane: - default.kdl defines the bar as a pane_template `sl0pbar` and places it at size=3; - default.swap.kdl defines tab_template "mobile" placing the same template at size=1, and the `stacked` swap layout -- what responsive_layout collapses to below responsive_min_cols -- uses it. That reuse works because zellij parses a layout and its .swap.kdl with the same parser, on purpose, "so that we can reuse assets (eg. pane and tab templates)". Otherwise the collapsed template would have to duplicate the whole 100-line zjstatus configuration, and the two would drift within a week. ModuleConfig::viewport is the one definition of where the content line lives: three rows or more and it is framed, fewer and it is not, plus the column the content starts at. Rendering and click routing both read it, so the frame moves the drawing and the hit-testing together -- a click on the new border hits nothing rather than the widget it sits above. Clicks now check the LINE too, which a single-line bar never had to. status-bar-live.py grew the other half of the feature: the borders must span exactly the columns the pane frames span with rounded corners at their ends, a click on the border must not make a tab, and after shrinking the terminal below the responsive threshold the bar must be one line with no box -- with its button still working. The collapse is real: the bar lands on the last row, which only happens if the swap layout actually switched. One test bug worth naming: locating the button with str::find gave a BYTE offset, and the box glyphs are three bytes each, so the click landed two columns right of the thing it found. Same trap the pane frame tests document.
* vendor(sl0pstatus): import zjstatus v0.24.0 treeuser2026-08-12
Squashed import of dj95/zjstatus at 74f36b4 ("chore: bump version to v0.24.0"), the merge-base our fork was developed against. Found by the phase-3 smoke test: installing the tarball into a throwaway HOME and actually starting a session logged failed to load plugin from disk: '~/.config/zellij/plugins/zjstatus.wasm' (No such file or directory) config/layouts/default.kdl replaces zellij's stock tab-bar + status-bar with a zjstatus bar, so the status bar is load-bearing for the default layout -- and the .wasm in the live config dir turned out to be a *custom build*, not the upstream release. Dropping it as "a third-party blob no longer referenced" (see the config snapshot commit) was wrong: it was referenced from the layouts, which that commit did not check.