Automatically stack certain windows
On my communications workspace, I have an email client and a Jabber client, tiled horizontally (Thunderbird occupying the left 4/5 of the screen, and Gajim contact list the remaining 1/5 on the right). There may be other windows stacked with Thunderbird.
Now I want to arrange for all chat windows spawned by Gajim to open stacked with its contact list.
If I only opened chat windows from my contact list, they would open in place automatically. But they also open when someone messages me.
I understand that I can arrange for my initial layout to be like this:
- H-split container
- Stacked container
- Thunderbird
- Stacked container
- Gajim contact list
- Stacked container
Then, I plan to have a for_window
rule matching all Gajim windows.
What do I need to write as the action, so as to move the new window to the second stacked container in that workspace?
As an ugly workaround, I used to use this:
assign [class="Gajim"] 2
for_window [class="Gajim"] focus; move right; move right; move left
but this doesn’t play well with switching Thunderbird’s parent container into tabbed layout. (I would need to increase the number of move right
s to the maximum number of tabbed windows I can have.)
It would be nice to have some of the workspace features for containers, too. Being able to predefine (named) containers, setting a layout (other than the global default) and assigning windows to them would go a long way to help with cases like this. I'd certainly like to see something like that.
Adaephon: Experiment with http://i3wm.org/docs/userguide.html#_vim_like_marks_mark_goto. Focus parent, set a mark, and some juggling is possible with this container.
joepd: I'm aware of that feature, but the container has to be already there in order to use it. And even with a mark on the container it is not possible to move a window into it by using that mark as target. Or am I missing something?
As far as I understand, marks add a different way to address a window or container, in case its class/instance/role is not unique enough. It does not, however, allow any new two-address commands involving a window and a container (such as `move window to container`).