The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

How can I define my workspace on startup

asked 2012-07-11 15:07:26 +0000

updated 2012-07-11 17:05:39 +0000

joepd gravatar image

Is there any way to define the workspace tiling from the config during startup?

I would like to have all my windows in place by default, instead of arranging them manually, something like:

|                              |                               |
|                              |             App 2             |
|                              |                               |
|            App 1             |-------------------------------|
|                              |                               |
|                              |                               |
|                              |                               |
|------------------------------|             App 4             |
|                              |                               |
|           App 3              |                               |
|                              |                               |

(it could start simpler, with just dividing the space equally, but I wonder if you could do more, like the above).

edit retag flag offensive close merge delete

3 answers

Sort by » oldest newest most voted

answered 2012-07-11 15:45:40 +0000

Michael gravatar image

You can’t do this right now unless you write some script which sends move commands etc. to i3.

edit flag offensive delete link more


Would that be the i3-msg command? Can I execute it from config to build up my workspace? Do you have an example of that in action?

bruno.braga gravatar imagebruno.braga ( 2012-07-12 01:12:46 +0000 )edit

I'd like to do the exact same thing. Have not come accross a solution yet.

BroX gravatar imageBroX ( 2012-07-27 21:52:10 +0000 )edit
Holger gravatar imageHolger ( 2012-08-09 14:15:57 +0000 )edit

Fantastic! Thanks!

bruno.braga gravatar imagebruno.braga ( 2012-08-11 13:27:16 +0000 )edit

answered 2012-08-09 08:36:29 +0000

Otchipoi gravatar image

But here is now answer too. Where is the person which has solved the problem?

My question was how to open on startup of i3 a quattro screen, like the above mentioned example.

Any solutions?

chers Udo

edit flag offensive delete link more


Have a look at the link. You will have to make your solution yourself. The ingredients are there :) Maybe this link is more helpful for constructing your solution:

joepd gravatar imagejoepd ( 2012-09-08 16:59:26 +0000 )edit

Have a look at the link. You will have to make your solution yourself. The ingredients are there :) Maybe this link is more helpful for construein

joepd gravatar imagejoepd ( 2012-09-08 16:59:27 +0000 )edit

answered 2012-10-12 11:54:01 +0000

i3-tiler gravatar image

updated 2012-10-12 12:03:54 +0000


I'm using a simple bash script which actually works just with i3-msg calls. I start that script with exec in ~/.i3/config. I'm sure it could be improved on some parts but it works for me and is simple to read. (The only thing you must not do is play around with the mouse while the layout is created. Otherwise your focus will get somewhere else and the layout is not like you wanted it.)

If somebody wants to take a look:

edit flag offensive delete link more


It looks like you abuse `sleep` to achieve a sequential execution of the i3 commands. You can avoid the use of `sleep` if you concatenate the particular i3 commands with a `;` and take the concatenated string as a command line argument for a single `i3-msg` execution...

nichtleiter gravatar imagenichtleiter ( 2012-10-14 11:04:08 +0000 )edit

That sounds to me like i3-msg commands go to background immediately after execution. That really could be because when I tested it without the sleep time between the result was never like I expected. I will give it a try.

i3-tiler gravatar imagei3-tiler ( 2012-10-17 14:01:58 +0000 )edit

Brief feedback @nichtleiter: I did like you suggested and changed my script to something like: i3-msg "focus output LVDS1; exec pidgin; exec thunderbird; ...;" but it works not like expected. It seems that the X windows of the apps need a certain state otherwise they are mixed up at creation time.

i3-tiler gravatar imagei3-tiler ( 2012-10-17 14:01:58 +0000 )edit

Question Tools



Asked: 2012-07-11 15:07:26 +0000

Seen: 7,196 times

Last updated: Oct 12 '12