The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

how to make the new window popout from the workspace where it is called

asked 2015-06-22 23:53:01 +0000

diablo465 gravatar image

updated 2015-06-22 23:58:34 +0000

For example, What I wish to achieve is that, if i type gvim & enter in a terminal located in workspace 5 and immediately switched to workspace 6. gvim should pop out in workspace 5. Currently, without the desired function, gvim is created in workspace 6.

This is a general configureation for all windows. therefore, transfering the window with particular name or class to specific workspace does not work for me:

https://faq.i3wm.org/question/2135/op...

This method is quite useful to separate the projects I am working into different workspaces. Every time I finish project 1 input in workspace 1 and expect new windows comming in 10 minutes, I can switch to workspace 2 and work on project 2. Currnetly, without the desired function, all the new windows associated with project 1 will appear at workspace 2 (sincei am working on that during the 10 min waiting), mixing up windows associated with project 2, and vise versa.

Thanks

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2015-06-23 05:01:44 +0000

i3convert gravatar image

updated 2015-06-23 05:41:10 +0000

This is a very partial solution, but I've been doing this for some very slowly starting applications. If you want this to work only for a specific window type (gvim), you can create a json layout somewhere:

{
    "name": "gvim will be here one day",
    "swallows": [
       {
       "class": "????",
       "instance": "????",
       "window_role": "????"
       }
    ],
    "type": "con"
}

where you have to figure out yourself what to replace ???? with, using for instance xprop. You can also skip some of the properties. Then whenever you want to run gvim, you have to:

  1. Call i3-msg "append_layout /full_path_to/your_layout_file" to load the layout.
  2. Run gvim.

The hope is the when gvim eventually starts, its window is consumed by the loaded layout.

Downsides:

  • The layout window is loaded on the top level of the current workspace, not where the focus currently is. I can imagine someone automatically moving the layout window to the scratchpad and then immediately back to where the focus is. This seems doable, but would require more work.

  • If your application has an unpredictable number of windows, you should probably move them automatically to the scratchpad and then write a script that moves them back to the the proper workspace (once it gets focused, I don't think you can do this before). This would require way more scripting and in particular subscribing to i3 events!

edit flag offensive delete link more
0

answered 2015-06-23 08:02:55 +0000

Airblader gravatar image

This already works in i3, but only if the application supports the startup notification protocol. You should file a feature request against them to support it.

edit flag offensive delete link more

Comments

I have not noticed this behaviour anywhere, yet. Could you please give an example for applications supporting this feature for me to test this? Thank you.

oberon gravatar imageoberon ( 2015-06-23 08:37:13 +0000 )edit

Eclipse, for example, does it.

Airblader gravatar imageAirblader ( 2015-06-23 14:17:01 +0000 )edit
Airblader gravatar imageAirblader ( 2015-06-23 14:17:29 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-22 23:53:01 +0000

Seen: 163 times

Last updated: Jun 23