zellij
zellij copied to clipboard
hide_floating_panes doesn't work with a `default_tab_template`
Hi, here is the layout i'm loading, btop always shows even though hide_floating_panes=true
using zellij 0.38.1 on nixos
PS. is there a way to setup keybinding to show/hide the pane?
tab name="Dev" focus=true hide_floating_panes=true {
pane split_direction="vertical" {
pane name="editor" borderless=true {
edit "."
}
}
pane split_direction="vertical" size=8 {
pane name="cargo run" borderless=true {
command "cargo"
args "run"
}
pane size="20%" borderless=true
}
floating_panes {
pane {
x "10%"
y "10%"
width "80%"
height "80%"
command "btop"
}
}
}
Works for me...
What I'm doing: I placed a layout node around it and loaded it with zellij -l /path/to/layout.kdl. The layout is loaded and btop is only triggered when I trigger the floating panes with Ctrl p + w. Also, this is the only way to trigger floating panes unless they're a plugin (and then you can focus the pane specifically with the LaunchOrFocus binding).
this is my full layout
layout name="sky360" {
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
// TODO: figure out how to show/hide a pane
// pane size=2 borderless=true {
// plugin location="zellij:status-bar"
// }
}
tab name="Sky360-Dev" focus=true hide_floating_panes=true {
pane split_direction="vertical" {
pane name="editor" borderless=true {
edit "."
}
}
pane split_direction="vertical" size=8 {
pane name="cargo run" borderless=true {
command "cargo"
args "run"
}
pane size="20%" borderless=true
}
floating_panes {
pane {
x "10%"
y "10%"
width "80%"
height "80%"
command "btop"
}
}
}
tab name="terminal" {
pane {
borderless true
}
}
// tab name="browser" {
// pane {
// command "w3m"
// args "https://search.nixos.org/packages"
// borderless true
// }
// }
tab name="btop" {
pane {
command "btop"
borderless true
}
}
}
keybinds {
shared {
bind "Alt 1" { Run "git" "status"; }
bind "Alt 2" { Run "git" "diff"; }
}
}```
Alright. Could you please find a minimal reproduction?
yes, working on it
it also seems that if i don't have the defalt_tab_template, the _hide_floating_panes is causing an error
this is minimum without default_tab_template... this one fail with error
layout {
tab focus=true hide_floating_panes=true {
pane split_direction="vertical" {
pane
}
pane split_direction="vertical" size=8 {
pane
pane
}
floating_panes {
pane {
x "10%"
y "10%"
width "80%"
height "80%"
}
}
}
}
this is minimum with default_tab_template
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab focus=true hide_floating_panes=true {
pane split_direction="vertical" {
pane
}
pane split_direction="vertical" size=8 {
pane
pane
}
floating_panes {
pane {
x "10%"
y "10%"
width "80%"
height "80%"
}
}
}
}
the most important for me is to be able to do keybinding to toggle a pane. not sure if its a feature to be added or already exists
looks like the code samples doesn't work https://zellij.dev/documentation/creating-a-layout#hide_floating_panes
layout {
tab name="Tab #1" hide_floating_panes=true {
pane
pane
floating_panes { // will start hidden
pane
pane
}
}
}
Friend, respectfully: let's please try to keep the chatter here to a minimum. Otherwise it gets hard to get into context and understand what the issue is about when we try to fix it. The only thing I was able to reproduce from the layouts in this issue was the combination of default_tab_template and hide_floating_panes=true. Everything else works for me.
Please be sure you're on the latest version. If you find other issues, please report them with a minimal reproduction (thanks for finding one here) one issue per reported problem, and if you're unsure or need support, please ask on discords/matrix.
Thanks.
To recap, this issue is about the following layout not hiding floating panes, everything else works at the time of writing:
layout {
default_tab_template {
pane size=1 borderless=true {
plugin location="zellij:tab-bar"
}
children
pane size=2 borderless=true {
plugin location="zellij:status-bar"
}
}
tab hide_floating_panes=true {
pane
floating_panes {
pane {
x "10%"
y "10%"
width "80%"
height "80%"
}
}
}
}
I have the same issue, to solve it temporarily i am repeating the code without using default_tab_template
Same issue here, doesn't work with tab_template and new_tab_template as well.
I have the issue with default_tab_template, but it seems to work with new_tab_template. Actually, I think the issue is hide_floating_panes=true doesn't work for predefined tab layouts.
Just encountered this issue. hide_floating_panes=true doesn't work when used along default tab layouts.
I am having this same issue.