Re: [i3] Starting apps on designated workspace only on i3 startup

  • From: James Robertson <j@xxxxxxxxxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Sat, 14 Apr 2012 18:56:35 +1000

Your application needs to support startup-notifications for that and you need
to use i3 >= v4.1. Just switch to a specific workspace and launch your app
there. "exec i3-msg workspace 2; urxvt" should work. Make sure you have
urxvt >= v9.14 with enabled startup-notifications.

Thanks! That certainly works to launch them on startup but I am still
having a bit of problem with the desktops they launch on.

I am using i3 version 4.1.2 (2012-01-27) and urxvt 9.15, I am running
Debian Sid and according the the source package for urxvt
startup-notifications are enabled. startup-notifications for
Iceweasel (Firefox) 10.0.0.3 are enabled according to it's .desktop
entry.

In my config I have added...

i3-msg workspace WEB ; iceweasel
i3-msg workspace TERM ; urxvt

But when I launch i3 urxvt opens on the same desktop as Iceweasel and
just now when I re-tested it Iceweasel opened on the TERM desktop and
urxvt on the WEB desktop. This is obviously due to the speed of
launch and they simply end up on the wrong desktop. As a test I added
these commands to a bash script

cat .bin/i3startup.sh
#!/bin/bash

i3-msg workspace WEB ; iceweasel
i3-msg workspace TERM ; urxvt

grep i3startup.sh .config/i3/config
exec i3startup.sh

Iceweasel launches and if I close Iceweasel then urxvt will open. I
can add an "&" at the end of the Iceweasel line but it has the same
affect as being on the i3 config.

Am I just doing something wrong or perhaps mistaken about the
startup-notification being enabled on these apps?

Other related posts: