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: it's great that you gave this script an update. Thanks so much!
EDIT: Upgrading to the latest version of
i3ass
solved the issue below 🥳 I hope you don't mind, but have a feature request: is it possible to add a setting (or make it default) that allows me to keep the zen container on the current workspace, if it's the only container there? Currently, it moves the container tows9
, because I usually have something onws8
.ws9
is beyond the limit I set for myself of 8 workspaces.Entering zen mode works most of the time. Sometimes the script chooses an occupied workspace, and the floating zen container is placed on top of open windows. Also, when I rerun the script while a zen container is focussed, the zen container moves to the next empty workspace, instead of disabling zen mode. I haven't modified the script in any way, and I'm running it using the i3 keybinding below. Do you know what could be causing this?