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

Status-bar - Hide tip line when plugin is configurer with size=1 #1864

Closed
welcoMattic opened this issue Oct 27, 2022 · 7 comments
Closed

Status-bar - Hide tip line when plugin is configurer with size=1 #1864

welcoMattic opened this issue Oct 27, 2022 · 7 comments

Comments

@welcoMattic
Copy link
Contributor

Actually, with a layout like this:

pane size=1 borderless=true {
    plugin location="zellij:status-bar"
}

It renders only the "tip line"
image

Could it be possible to change it to render only the "controls line"?

Or better, add an option to configure the plugin from the layout like:

pane size=2 borderless=true {
    plugin location="zellij:status-bar" options="lines:tip,controls"
}
pane size=1 borderless=true {
    plugin location="zellij:status-bar" options="lines:controls"
}

Where we can choose the rendered line when size=1?

Thanks

@imsnif
Copy link
Member

imsnif commented Oct 27, 2022

Hey, we can definitely add this as an option - but have you maybe considered the compact-bar instead?
https://github.com/zellij-org/zellij/blob/main/zellij-utils/assets/layouts/compact.kdl#L4

@welcoMattic
Copy link
Contributor Author

compact bar is about displaying tabs, right? It adds the display of the current mode, but not the controls list?

@imsnif
Copy link
Member

imsnif commented Oct 27, 2022

True - I guess you still want the mode+shortcuts display?
In that case we can make the status bar "do the right thing" depending on its size. Shouldn't be super difficult to change

@welcoMattic
Copy link
Contributor Author

Yes, exactly. I'm super newbie in Rust. I guess I found the right place to do the trick, but not sure.

I guess we have to add some condition right there https://github.com/zellij-org/zellij/blob/main/default-plugins/status-bar/src/main.rs#L225-L233 ?

@imsnif
Copy link
Member

imsnif commented Oct 28, 2022

I guess we have to add some condition right there https://github.com/zellij-org/zellij/blob/main/default-plugins/status-bar/src/main.rs#L225-L233 ?

That seems right, yes! Would you like to give it a shot? If so, be sure to follow the build instructions in CONTRIBUTING.md - otherwise the plugins won't build and it could be very frustrating to figure out why your changes aren't taking effect.

@welcoMattic
Copy link
Contributor Author

welcoMattic commented Oct 28, 2022

@imsnif PR is open ;)

@imsnif
Copy link
Member

imsnif commented Oct 31, 2022

Thanks again @welcoMattic !

@imsnif imsnif closed this as completed Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants