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

Setting layouts upon i3 launch

asked 2012-07-13 01:33:11 +0000

0x000000 gravatar image

Arch Linux, i3 4.2-2.

The last line of my i3 config file is

exec_always i3-init

Where i3-init is the following shell script:


tabbed=( 1 4 6 7 )

for w in $tabbed; do
    i3-msg "workspace $w; layout tabbed"

i3-msg "workspace 1"

So on workspaces 1, 4, 6, and 7, set the tabbed layout. The problem is that the layout isn't actually set when this script is run unless there are windows on the workspace, so I either have to set the layout manually or restart i3 after the windows exist. Am I doing this wrong or is this a limitation?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2012-07-13 06:20:56 +0000

Michael gravatar image

updated 2015-10-11 10:25:18 +0000

You can’t do it this way. Workspaces are destroyed when you switch away from them (and that’s not going to change). Instead, have a look at this ticket:

edit flag offensive delete link more


Right on, I didn't realize the workspaces were destroyed. Thanks for the link.

0x000000 gravatar image0x000000 ( 2012-07-13 12:44:45 +0000 )edit

answered 2013-01-26 03:27:12 +0000

What about working around by adding extra commands to your workspace switch key?

workspace_layout tabbed
bindsym $mod+2 workspace 2; layout default
bindsym $mod+3 workspace 3; layout default
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-07-13 01:33:11 +0000

Seen: 4,369 times

Last updated: Oct 11