zellij
zellij copied to clipboard
missing feature: passthrough?
What happens when I run zellij on my host, and zellij on my remote machine, thus rendering two sets of frames? How do I pass through keystrokes to another instance.
This already sort of works with only-two sessions, because you can lock the top layer and trigger the inner second layer, but obviously this doesn't work for everything, doesn't generalize past two layers, etc.
It seems that, as tmux offers, there needs to be a way to say "the next keystroke specifically goes to the focused pane".
So, this is actually a big problem in my personal workflow. When I develop Zellij, I am forced to open my "development" copy in a different terminal window because of this. So I feel strongly about solving it :)
I like the idea of having a shortcut that would say "the next keystroke specifically goes to the focused pane" as you suggest. I kind of feel though that we might be able to make this an additional "escape hatch" to an otherwise more intuitive out-of-the-box workflow.
Here's my suggestion: When we have nested Zellij sessions, the commands will always go to the deepest session, unless:
- If the deepest session is locked, it will go one layer up
- If all sessions are locked and the user presses
ctrl-git will unlock all sessions
What do you think?
@imsnif Is zellij able to do two-way communication between nested sessions in a generic way? If so a ctrl-$ N would be an option as well, where $ is some key we didn't decide on yet and N is the depth you want to execute upcoming commands at.
This way you can easily jump back and forth between levels, which is useful when sshing through jumpboxes/bastions.
@Lillecarl - if I'm being honest this sounds a bit complex both to implement and to use... do you find yourself very often with more than 2-3 nested Zellij sessions?
@imsnif 3 isn't entirely uncommon, one on my host, one on a bastion, one on the server i'd like to remote.
An action to unlock all the way down rather than having to cycle through locks could probably work nice too. But relying on pressing something multiple times in a sequence will 100% lead to people "overshooting" the lock status quite a bit. So that might be a good middle ground.
Though if the framework of bidi communication is in place that could find a lot of other cool usecases in the future (But beyind the scope of this issue).
I think I've nested 4x at most. usually the panes are fullscreen then and I mostly use Zellij/tmux to not lose state.
I think that is a solution that would fit well I think. It could be bound to the session-mode. And for example Up/Down - J/K - Could be session up / session down. And the numbers could be the nesting sessions themselves.
Ah, that's a pretty cool idea @a-kenji !! Like in SESSION mode, assuming the session is nested you'd be able to walk through the sessions... Meaning that all sessions except the focused one are locked. Right?
@imsnif, Yes, that would make sense for me.
Could all workflows with nested session also be achieved by having a single zellij client connect to multiple (local and remote) servers and their sessions? See also https://github.com/zellij-org/zellij/issues/387
If so, this seems more elegantly and ergonomically from a user perspective.
I have zellij -> ssh -> tmux for sharing terminal sessions on a server with our dev team
so I think there needs to be a general solution, not just for zellij -> zellij
@markus-wa just lock zellij with ctrl+g
:exploding_head: I was just frantically searching for "zellij escape key" for one hour now
yet it was always right in front of me ... :sweat_smile:
thanks, that solves it for me! :smile:
looking forward to see passthrough for base16-shell possible to work with zellij like tmux does.