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 support for Zellij #23

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #11

Update the environment check in wut/wut.py to support Zellij.

  • Modify the check to include os.environ.get("ZELLIJ").
  • Update the error message to include Zellij, indicating that wut must be run inside a tmux, screen, or Zellij session.

Related to shobrook#11

Update the environment check in `wut/wut.py` to support Zellij.

* Modify the check to include `os.environ.get("ZELLIJ")`.
* Update the error message to include Zellij, indicating that `wut` must be run inside a tmux, screen, or Zellij session.
@shobrook
Copy link
Owner

I don't know anything about Zellij, but won't you also have to update the function that gets the terminal output?

@verchalent
Copy link

I don't know anything about Zellij, but won't you also have to update the function that gets the terminal output?

Yes, you would need to do that as well. Pretty sure the DumpScreen function (https://zellij.dev/documentation/keybindings-possible-actions) is the right one.

@vishwamartur vishwamartur marked this pull request as draft December 27, 2024 14:33
@verchalent
Copy link

I think I have this working, but I am holding off on the PR until I confirm there isn't a better way. So far I'm hitting two issues with Zellij and subprocess. The easy one is that it does not like check_output. moving to subprocess.run(). This is likely fixable, but I was more focused on getting it all to work. My real issue is that using subprocess causes zellij to dump a blank pane instead of the current. The only way I've found to address this is using os.system() , which is not ideal imho. Going to contact the zellij devs to see if there's a better way that I'm just not seeing.

Working test is at https://github.com/verchalent/wut if anyone wants to sanity check.

@shobrook
Copy link
Owner

shobrook commented Jan 6, 2025

Maybe using a pseudo-terminal would help.

@verchalent
Copy link

Maybe using a pseudo-terminal would help.

I'll give it a try.

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.

3 participants