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

Add a way to "give a pane" to some functions [FR: plugin API] #2870

Closed
8 tasks done
Tracked by #1
Zykino opened this issue Oct 16, 2023 · 1 comment
Closed
8 tasks done
Tracked by #1

Add a way to "give a pane" to some functions [FR: plugin API] #2870

Zykino opened this issue Oct 16, 2023 · 1 comment

Comments

@Zykino
Copy link
Contributor

Zykino commented Oct 16, 2023

As a plugin, it the following function feels like they miss a parameter to say "execute the function on that pane". They have little to no meaning on the plugin’s pane or would just benefit of a Option<pane_id> or whatever as argument.

  • clear_screen
  • edit_scrollback

Just 👀 the function list I think the following would have a similar issue:

  • page_scroll_{down,up}
  • resize_focused_pane
  • resize_focused_pane_with_direction
  • scroll_{down,up}
  • scroll_to_{bottom,top}
  • write{,_chars}

Maybe everything that change something in a pane/tab could have a target_id?

(I’m making a checklist because I think there can be more I did not discovered yet. So I will add them as long as the issue is open, or re-open the issue if you want that flow.)

@Zykino
Copy link
Contributor Author

Zykino commented Aug 29, 2024

Fixed by #3576

There is even more than I originally listed:

  1. MovePaneWithPaneId - move the pane with this ID (circle through its location)
  2. MovePaneWithPaneIdInDirection - switch the location of the pane with this id with another pane in this direction (if it is tiled) or change its location in direction if it is floating

and

  1. TogglePaneIdFullscreen - toggle this pane as fullscreen (if it is tiled) on and off
  2. TogglePaneEmbedOrEjectForPaneId - embed the pane with this id if it is floating, float it if it is tiled

Thanks imsnif for this!

(Note for others: I’m closing the issue since the API appears to be created. I did not checked them myself. If an issue is spotted on any implementation, please create a specific issue for it.)

@Zykino Zykino closed this as completed Aug 29, 2024
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

1 participant