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

dynamic per-subfolder tabs/panes #3380

Open
feakuru opened this issue May 27, 2024 · 2 comments
Open

dynamic per-subfolder tabs/panes #3380

feakuru opened this issue May 27, 2024 · 2 comments

Comments

@feakuru
Copy link

feakuru commented May 27, 2024

I apologize if this is already described in the docs and I missed it, but basically what I want is to be able to define a tab template, and then run zellij in a directory in such a way that it opens one tab of that template per a subdirectory of that directory. Currently, I am using tmux+tmuxinator for this, and there it's possible with minimal Ruby knowledge since they use ERB templates, like this:

windows:
  <% Dir["/folder/with/my/subprojects/*"].each do |file| %>
  <% if Pathname.new(file).directory? %>
  - <%= File.basename(file) %>:
      root: <%= file %>
      layout: d4f6,245x40,0,0{81x40,0,0,0,163x40,82,0,1}
      <% if File.exists?(File.join(file, "pyproject.toml"))%>
      panes:
        - poetry shell
        - poetry run nvim
      <% else %>
      panes:
        - zsh
        - nvim
      <% end %>
  <% end %>
  <% end %>

so when i open this layout, i get a tab per subfolder, and each tab has a terminal and a nvim instance. is something like this possible in zellij?

@giyany
Copy link

giyany commented May 27, 2024

Hi there, do you know about zellij layouts?

A tutorial:
https://zellij.dev/tutorials/layouts/

There is more information in the docs. For specific configuration, the zellij Discord and Matrix are good places to find help.

@feakuru
Copy link
Author

feakuru commented May 27, 2024

thanks! i do know about zellij layouts, my question is whether i can somehow implement a dynamuc cycle over subfolders in a folder in a layout. reading through zellij docs and KDL format specification, i didn't find a way to do this other than to manually specify each folder name

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