Make windows floating before moving them to origin workspace.
Use workspace name when appropriate.
Fixed issue with calculating the next free workspace. When the zencontainer is created, if the last window of a workspace is used to create it. The current workspace will be the zen workspace.
This script depends on i3list and i3var from i3ass.
When the command is triggered it will move the current window to a zen container. The zen container is a floating, tabbed, and zentered container on a clean workspace. If no zen container exist it will be created.
If the current window already is in the zen container it will get moved to the workspace it originally came from.
The previous version used two "ghost windows" to make a tiled container appear centered. But i figured why not use a floating container instead, script is a lot faster and experience better. Now it is also possible to set the height (also in percentage) of the container.
Available environment variables:
ZEN_WIDTH , ZEN_HEIGHT, ZEN_WORKSPACE, ZEN_VERBOSE
@budRich That's really kind. Thanks a lot!
This version almost works for me. When I first run the script, the floating zen container is created on the current workspace. However, when I rerun it, the container is moved to the next empty workspace. That is, it's not 'undoing' the operation, which is what I'd expect.
I'm sorry for bothering you with this. I'm a developer myself, but I'm not too familiar with bash scripting and your
i3ass
programs, so I found it hard to follow your script, even though I can see it's well-structured.