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
No worries ben. I am glad you gave me a reason to revisit this script, and I think I will add it back to i3ass . Regarding i3/i3gaps, I think the differences that matter for my scripts to work are all minor diffs between the output of
i3-msg -t get_tree
. For example. in i3-gaps there are some properties named"gaps": 15,
or similar which ofc are not in the json from i3wm, but i think that there might be other differences as well, like the order of properties. as an example: in i3wm,"name":...,
comes before"instance":...
where it could be the otherway around in i3-gaps.I usually just pipe the json through
jq
to prettify it and open it in a text editor to examine stuff like this, but i guess another good tool in this case would bediff
. But it is somewhat tedious to work with this, since it would mean i need to have both versions of i3 installed, toggle between them to gather the output i need and stuff like that. The json is also a bit, awkward, since some properties if they are not set has a null value, f.i."marks":
while other properties are simply not present in the json if they are not set, f.i."title_format":
.So getting i3ass to work on i3gaps is mostly a matter of finding these differences in the json output.