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

Feature: cli actions: query panes; go-to pane by name or id; query #2835

Closed
fedoranvar opened this issue Oct 4, 2023 · 7 comments
Closed

Comments

@fedoranvar
Copy link

Good day to you!

suggesting features for zellij action:

  • query tabs:
    input: zellij action query-tabs
    output: { 'id': tabid, 'name': 'tabname', 'active': active_or_not }
  • query panes:
    input: zellij action query-panes
    output: { 'id': paneid, 'name': panename, 'active': active_or_not, 'tabid': tabid, 'command': currentcommand }
  • go-to pane:
    input: zellij action go-to pane --name pane_in_currentab
    output: focus named pane in current tab

usecase: make IDE by bonding zellij and Helix editor

@azarmadr
Copy link

It would be great such api to query current pane and allow other apps/scripts to use that knowledge to perform actions like, on active pane do not do X

@davxy
Copy link

davxy commented Nov 8, 2023

Related: #2779 #2845

@mrdgo
Copy link

mrdgo commented Mar 25, 2024

Another use case: I integrate zjstatus with neovim. For that, the zjstatus module needs to identify the active pane to render the appropriate status line.

@imsnif
Copy link
Member

imsnif commented May 2, 2024

All of these can be done with plugins. This is the Zellij way.

I realize a lot of people are used to doing these things through the CLI - I get it and I totally empathize: this is not the Zellij way. We concentrate on plugins so that distinct pieces of logic will be cross-platform, require no installation, be aware of multiple users, be able to in the future render themselves in a text/ui agnostic way and be sandboxed to user permissions.

The CLI interface is a stop gap solution and I don't want to spend a lot of time expanding it. Please write plugins - I will do (and am doing) everything in my power to make this as easy as possible.

Thanks.

@WizardUli
Copy link

All of these can be done with plugins. This is the Zellij way.

I realize a lot of people are used to doing these things through the CLI - I get it and I totally empathize: this is not the Zellij way. We concentrate on plugins so that distinct pieces of logic will be cross-platform, require no installation, be aware of multiple users, be able to in the future render themselves in a text/ui agnostic way and be sandboxed to user permissions.

The CLI interface is a stop gap solution and I don't want to spend a lot of time expanding it. Please write plugins - I will do (and am doing) everything in my power to make this as easy as possible.

Thanks.

The last one absolutely cannot be done via plugins!
Plugin API is completely missing go_to_pane_name or any alternative whatsoever. (Yes I read https://zellij.dev/documentation/plugin-api-commands)

@imsnif
Copy link
Member

imsnif commented Sep 30, 2024

The last one absolutely cannot be done via plugins! Plugin API is completely missing go_to_pane_name or any alternative whatsoever. (Yes I read https://zellij.dev/documentation/plugin-api-commands)

Check out https://zellij.dev/documentation/plugin-api-commands#focus_terminal_pane and https://zellij.dev/documentation/plugin-api-commands#focus_plugin_pane

@imsnif
Copy link
Member

imsnif commented Sep 30, 2024

You are more than welcome to ask help on our Discord or Matrix if you're not sure how to do something (better Discord tbh because more plugin authors hang out there).

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

6 participants