1

I'm trying to start different apps in different workspaces without using classes.

I have already tried the suggestion at start applications on specific workspaces when i3 starts by including in i3/config:

exec --no-startup-id i3-msg 'workspace 1; exec /usr/bin/firefox'
exec --no-startup-id i3-msg 'workspace 2; exec /usr/bin/emacsclient -c'

But it opens both apps in same workspace (1).

How can I open Firefox in workspace 1 and Emacs in workspace 2?

  • Not using classes so If I want to open another instance of the same app in a different workspace I should be able to do it.

Related but no duplicate: Start applications without class attribute on specific workspaces

1

I had a similar issue when first using i3. I found the easiest solution was simply to add in a quick sleep in-between each application. As an example, this is part of my startup commands section of my i3/config:

exec --no-startup-id sh -c 'sleep 1; i3-msg "workspace 10: <icon>"'
exec --no-startup-id "sh -c 'sleep 2; exec gnome-terminal --working-directory=/media/Data/Music -e ranger'"
exec --no-startup-id sh -c 'sleep 3; i3-msg "splitv"'
exec --no-startup-id sh -c 'sleep 4; exec gnome-terminal -e cava'
exec --no-startup-id sh -c 'sleep 5; i3-msg "focus up"; i3-msg "splith"'
exec --no-startup-id sh -c 'sleep 6; i3-msg "workspace 3: <icon>"'

This switches to different workspaces and opens up different applications/terminals.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.