2

I tried i3 no_focus and focus but it's not working for Firefox only.

My i3 config:

exec i3-msg workspace 1
no_focus [class="Firefox"]
exec --no-startup-id i3-msg 'workspace 1; exec /usr/bin/google-chrome'
exec --no-startup-id i3-msg 'workspace 1; exec /usr/bin/firefox'
exec i3-msg "[class=Google-chrome] focus"

I need google-chrome to be focused on startup.

I found a related one but it's not useful: Prevent Firefox from taking focus when opening link in other application : i3wm

1 Answer 1

2

no_focus setting won't work if your application is the first one on a workspace. From i3 User's Guide:

no_focus will also be ignored for the first window on a workspace as there shouldn’t be a reason to not focus the window in this case. This allows for better usability in combination with workspace_layout.

One way to achieve what you want is to separate startup of this applications to make sure that Chromium will be launched last:

exec --no-startup-id firefox
exec --no-startup-id sleep 3 && chromium-browser
3
  • but this will always open browser windows in workspace 1 @diffy
    – Akhil
    Jul 4, 2020 at 13:37
  • @AkhilJ, edited config - removed workspace assignment. That way both applications will open on your default workspace 1 only at startup.
    – anlar
    Jul 4, 2020 at 13:55
  • is it possible to make it in tabbed mode ? @diffy
    – Akhil
    Jul 4, 2020 at 14:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .