It is possible, but not in a straight forward way. A simpler solution by far would be to not use fullscreen at all and put the terminal on its own workspace (with horizontal split layout) and move the firefox window there when needed.
But, if you want to keep using fullscreen, here we go:
While it is possible to call the split <horizontal|vertical>
on a fullscreen window, its effects (creation of a new surrounding container with the chosen layout) will not be placed on the fullscreen window, but on the currently invisible tiled layer. So, in order to split a fullscreen window and actually have the new split container in fullscreen we need to leave fullscreen, split the container and put the newly created parent container into fullscreen. With i3's command chaining this can be done in one go:
fullscreen disable, split horizontal, focus parent, fullscreen enable, focus child
We need a method to put a specific window into that new split. For that we can adapt the answer to the question Move any container directly where the last split was done.
We can move the wanted window into this split via scratchpad. In the linked answer it was just the current window that was marked and intended to be moved into another (not focused) split, which is obviously not the way to go here. Here the currently focused container is the intended destination, but the window to move is neither focused nor even visible. If you want to only ever move Firefox that way, you can just use the class
criterium to select it. The minimal way to put a Firefox window into the same container as the current window would be:
[class="^Firefox$"] move scratchpad, scratchpad show, floating disable
Unfortunately, this will leave fullscreen mode when calling scratchpad show
. To resolve this, we need to put it back into fullscreen:
[class="^Firefox$"] move scratchpad; scratchpad show, floating disable; focus parent; fullscreen enable; focus child
If we want to do this in one go, you can combine both commands:
fullscreen disable, split horizontal; [class="^Firefox$"] move scratchpad; scratchpad show, floating disable; focus parent; fullscreen enable; focus child
In order to pull different windows into the split we obviously need to change the criterium. For interactive use, we could even utilize dmenu
(calling dmenu
does not end fullcreen) or adapt some answer from this question.