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 The cwd and Process ID to PaneInfo for use by Plugins #3765

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

a-usr
Copy link

@a-usr a-usr commented Nov 12, 2024

I figured this would be nice to have (and I also need at least the cwd for a Plugin I'm writing for myself)

On Hold until #3764 is Finished and Merged

Ideas

  • Lock both of these behine a new Permission? e.g. "Inspect Process Information" (Possibly introduces spagetti??)

@a-usr
Copy link
Author

a-usr commented Nov 12, 2024

Note: I will have to re-comment-out the contents of the zellij-utils/assets/prost/build.rs

@imsnif
Copy link
Member

imsnif commented Dec 19, 2024

Hey @a-usr - thank you for putting this together and sorry it took me so long to get to this. There is a parallel effort to get something like this done in #3800 and I think I would like to move forward with that one as it's something that me and the other contributor have already discussed beforehand.

I also saw your other PR regarding separating the Pane trait. I appreciate the effort and willingness but that sort of refactoring would be a major effort (a lot of the affected areas aren't properly covered in our tests) and I'd rather only do it if we "gain" something from it (namely starting to break down the code-base into separate built-in plugins).

I do see you familiarized yourself quite well with the Zellij code-base though and have shown a willingness to do some hard work in non-trivial areas. If you'd like to contribute in other places, I have some things in mind that need doing. Let me know here if you do.

@a-usr
Copy link
Author

a-usr commented Dec 19, 2024

Hey imsnif, considering that #3800 is already in a semi-working state, as far as I can tell, moving forward with that would probably be for the better.

Regarding my other pr, from my perspective the ultimate thing to gain here would be a structure that is easier to get an overview of, compared to what is currently in place. Because, to be completely honest with you, I got the impression that code-wise, zellij's structure was mainly held together by thin strings spanning across the codebase. I at least couldnt make out a clear structure which the code followed.

That is probably because, unlike you seem to have observed, I am not that familiar with zellij's codebase, and only knew a couple of areas, many of which I probably have already forgotten. However I would still be willing to lend some help, as long as it fits my skills.

@a-usr
Copy link
Author

a-usr commented Dec 19, 2024

Also, to be completely clear, I am in no way trying to insult you or anyone else, I just want to lay out my impression

@imsnif
Copy link
Member

imsnif commented Dec 20, 2024

I totally hear you about the code structure of the application. Zellij is a real-world application with many users who depend on it as their daily driver. On the other hand, it has only one developer plus some occasional short or long-term contributors (who do excellent work that I very much value, just to be clear).

For this reason, the main focus of the development is giving the end-users (current and future) a good experience. Not about creating beautiful or even consistent code. The code-base itself is optimized to my convenience because 95%+ of the time, I'm the one who has to adjust it. I'm the sort of developer who's better at keeping things in their head, adjusting them and moving them around than they are at understanding arbitrary data and control structures. That's why this code-base tends to follow this approach.

I appreciate your kind words, but don't worry about offending or anything of the sort! I've been developing mostly in the open for over 10 years, I don't mind hearing people's opinions of my work. :)

As for the task at hand, I'm looking at exposing the logical configuration structure of Zellij (namely the Options struct) to plugins so that they can more easily read and change the session configuration (for the latter, we're now relying on passing the stringified configuration through the reconfigure plugin API, which is alright but not great). Let me know if this is something that's interesting for you and we can discuss further.

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

Successfully merging this pull request may close these issues.

2 participants