Open hakan-demirli opened 10 months ago
zellij action go-to-tab-name "Tab #3" -c
also achieves the same. However, this action is also not available in config.
Unfortunately, calling it via shortcut creates a new pane rather than switching tabs.
bind "Alt 1" {
Run "bash" "-c" "zellij action go-to-tab-name 'Tab #1' -c";
}
Did you figure out a workaround for this? I'm looking for the same.
Unfortunately, I am still using Tmux. This is only one of the features available on Tmux but not Zellij. It will probably take a couple more years until Zellij becomes a viable Tmux replacement for my workflow.
Currently FocusOrCreateTab action exists but I can not use it in my
config.kdl
. Can we make it available to user?Why? I use tabs like workspaces in a desktop environment. I tap <win+1> It goes to workspace-1 etc. I can also achieve same thing in tmux using a bash script. I tap <alt+3> it goes to tab 3.
In both cases I do not need to create a workspace/tab. If it exists it switches to that one. If it does not it creates a new one.
In zellij I couldn't find a way to check wheter if the tab exists before creating a new one. Since, the names are not unique
NewTab {name "tn";}
is not sufficient. It just creates another tab with the same name.Proposal Let the user use FocusOrCreateTab https://github.com/zellij-org/zellij/blob/35d93189e3638011883a931a96aea656dd125094/zellij-tile/src/shim.rs#L553-L554