Re: [i3] Predefined Layouts

  • From: Joep van Delft <joepvandelft@xxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Wed, 25 Apr 2012 10:09:20 +0200

You can also separate the commands with a &&:

i3-msg split h && \
i3-msg exec urxvt && \
i3-msg exec urxvt && \
i3-msg split v && \
i3-msg exec urxvt


joep


On Wed, 25 Apr 2012 17:17:53 +1000
James Robertson <j@xxxxxxxxxxxxxxxx> wrote:

Use:
i3-msg split h
i3-msg exec urxvt
i3-msg exec urxvt
i3-msg split v
i3-msg exec urxvt

That doesn't work and it simply opens 3 terminals vertically for me.
I had a hunch that it was executing faster than urxvt could load and
so added some sleeps as follows:

i3-msg split h
i3-msg exec urxvt
sleep 1
i3-msg exec urxvt
sleep 1
i3-msg split v
i3-msg exec urxvt

This works exactly as intended and the terminals are loaded in the
right positions, albeit slowly...

The following is logged when I run the command with the sleeps:

Apr 25 17:09:46 sidbox x-session: should execute /tmp/foo.sh,
no_startup_id = 0 Apr 25 17:09:46 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:09:46 sidbox x-session: done, json output = (null)
Apr 25 17:09:46 sidbox x-session: splitting in direction h
Apr 25 17:09:46 sidbox x-session: single command completely parsed,
dropping state...
Apr 25 17:09:46 sidbox x-session: done, json output = (null)
Apr 25 17:09:46 sidbox x-session: {"success":true}
Apr 25 17:09:46 sidbox x-session: anything else: *u*
Apr 25 17:09:46 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:09:46 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:09:46 sidbox x-session: done, json output = (null)
Apr 25 17:09:46 sidbox x-session: {"success":true}
Apr 25 17:09:47 sidbox x-session: anything else: *u*
Apr 25 17:09:47 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:09:47 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:09:47 sidbox x-session: done, json output = (null)
Apr 25 17:09:47 sidbox x-session: {"success":true}
Apr 25 17:09:48 sidbox x-session: splitting in direction v
Apr 25 17:09:48 sidbox x-session: single command completely parsed,
dropping state...
Apr 25 17:09:48 sidbox x-session: done, json output = (null)
Apr 25 17:09:48 sidbox x-session: {"success":true}
Apr 25 17:09:48 sidbox x-session: anything else: *u*
Apr 25 17:09:48 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:09:48 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:09:48 sidbox x-session: done, json output = (null)
Apr 25 17:09:48 sidbox x-session: {"success":true}
Apr 25 17:09:49 sidbox x-session: single command completely parsed,
dropping state...
Apr 25 17:09:49 sidbox x-session: done, json output = (null)

Without the sleeps...

Apr 25 17:11:49 sidbox x-session: should execute /tmp/foo.sh,
no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: splitting in direction h
Apr 25 17:11:49 sidbox x-session: single command completely parsed,
dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: {"success":true}
Apr 25 17:11:49 sidbox x-session: anything else: *u*
Apr 25 17:11:49 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: {"success":true}
Apr 25 17:11:49 sidbox x-session: anything else: *u*
Apr 25 17:11:49 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: {"success":true}
Apr 25 17:11:49 sidbox x-session: splitting in direction v
Apr 25 17:11:49 sidbox x-session: single command completely parsed,
dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: {"success":true}
Apr 25 17:11:49 sidbox x-session: anything else: *u*
Apr 25 17:11:49 sidbox x-session: should execute urxvt,
no_startup_id = 0 Apr 25 17:11:49 sidbox x-session: single command
completely parsed, dropping state...
Apr 25 17:11:49 sidbox x-session: done, json output = (null)
Apr 25 17:11:49 sidbox x-session: {"success":true}

I cannot make out any difference except the execution delay between
them. Is there anything I can do to troubleshoot this?

Thanks


Other related posts: