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

Weird startup workspace behavior

asked 2014-02-26 14:58:07 +0000

anonymous user

Anonymous

updated 2014-02-26 14:58:59 +0000

I have this code snippet in my config. It opens up the "Web" workspace just fine, but with the others, they just open up on the same workspace. I'm confused. It seems random on the workspace that the rest of them open on. It's really weird. Did I make a typo that I can't see for the life of me?

#Startup Application on named workspaces
exec i3-msg 'workspace 1:Web ; exec chromium' 
exec i3-msg 'workspace 2:Term ; exec rxvt -rv'
exec i3-msg 'workspace 8:IRC ; exec rxvt -rv -e irssi'
exec i3-msg 'workspace 9:Music ; exec clementine'
edit retag flag offensive close merge delete

Comments

I've bound these exact commands to shortcuts and it works perfectly. Why doesn't it work on startup?

dylan gravatar imagedylan ( 2014-02-26 20:23:54 +0000 )edit

3 answers

Sort by » oldest newest most voted
0

answered 2014-03-06 18:04:56 +0000

Pinyaka gravatar image

i3 doesn't wait for commands to finish, so if the command doesn't notice which workspace you started the execution from, it will show up on whichever workspace is selected when the window opens.

edit flag offensive delete link more

Comments

This is not entirely correct. i3 does remember on which workspace you started an application and will open the applications windows on that workspace. This requires startup-ids to be supported by that application, though.

Michael gravatar imageMichael ( 2014-04-17 12:56:39 +0000 )edit
0

answered 2014-03-07 12:58:34 +0000

gunjanthesystem gravatar image

Try this:

exec --no-startup-id i3-msg 'workspace 1:Web ; exec chromium; workspace 2:Term ; exec rxvt -rv;workspace 8:IRC ; exec rxvt -rv -e irssi';workspace 9:Music ; exec clementine'

edit flag offensive delete link more

Comments

1

What’s correct in this answer is the --no-startup-id for running i3-msg itself (since i3-msg is not a GUI application). But why would concatening all the commands together be any different than what the original poster does?

Michael gravatar imageMichael ( 2014-04-17 12:57:14 +0000 )edit
0

answered 2014-03-15 22:29:56 +0000

joepd gravatar image

updated 2014-03-15 22:32:10 +0000

Why it does not work? Race conditions that might be circumvented by the --no-startup-id-flag for applications that support it.

How to make it work? for_window.

edit flag offensive delete link more

Comments

Note that using for_window in this case is a hack and should not be necessary. Instead, the proper solution is to make rxvt (and perhaps clementine?) support startup ids. I know that in urxvt, they work (I implemented them there ;)).

Michael gravatar imageMichael ( 2014-04-17 12:58:15 +0000 )edit

Question Tools

Stats

Asked: 2014-02-26 14:58:07 +0000

Seen: 382 times

Last updated: Mar 15 '14