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
@benjaminvdb I updated the script. But I am not sure it have fixed your issue. (I can't replicate your issue). But there was a "bug". i didn't realize that the windows in the zen container are not floating, they are considered tiled, even if the parent container is floating. Before realizing this I had issues not when the zen container was created, rather when windows where sent from it. But now it works for me 100%.
You can start the script like this:
ZEN_DEBUG=1 zen
and it will print stuff to stderr about which commands was executed and such. (if you execute thezen
command from a keybinding its a bit tricky to see this output, but for testing purposes you fire the command from the terminal). Also, when you try a new version of the script it is probably a good idea to either do it in a fresh session (log in/out from i3/X) or clear all marks (i3-msg unmark
). It can also be helpful to look at the marks:i3-msg -t get_marks
.If you still have the issue, i guess it would be good to see exactly what workspaces and windows you have open before and after the zen container is created. You can make a dump of the i3 tree with the command:
i3-msg -t get_tree
, it will spit out a quite large minified json object. paste the output of that command, both before and after you have done i3zen.you can use the script below and paste the content of i3treeop
be aware that the json can contain sensitive information in the form of the full title of windows and such