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

chrome windows to different workspaces (marks?)

asked 2014-04-16 08:45:43 +0000

mbs gravatar image

The flexibility of i3 allows me to manage windows effortlessly. However, I have a problem with chrome (both google-chrome and chromium).

I have a personal gmail account (and related chrome user/profile) and work google apps account (under a different chrome user/profile).

What I want is to find a config solution that would understand opening the first chrome profile in workspace X and the second profile in workspace Y. Problem is that both chrome windows (each profile opens a different window) have the same "class" and "instance" (according to xprop). Also, the "name" property is unreliable as it changes depending on the page currently displayed.

Both chrome profiles are started at boot with an "exec" instruction in the config file. I tried the "--class" GTK flag but it only works with the first "exec" (first profile/chrome window opened) while the second one (second profile) retains the first class definition and ignores its own flag. Chrome runs all profiles in the same process tree apparently so the one "class" defined at first start sticks until quit.

How would I instruct i3 to open each profile in a different workspace?

Hope I've been clear. Thank you in advance for your help.

edit retag flag offensive close merge delete

Comments

Mine is hardly an answer so I comment: would this help: http://i3wm.org/docs/userguide.html#_vim_like_marks_mark_goto

KJ44 gravatar imageKJ44 ( 2014-04-16 18:52:43 +0000 )edit

KJ44, I've looked into it before posting the question but it does not solve the problem as marking windows requires user intervention, which is not what I was looking for. Thank you very much anyway. I believe Michael answer is the solution.

mbs gravatar imagembs ( 2014-04-18 14:07:26 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-17 12:27:49 +0000

Michael gravatar image

The trick is to use the --user-data-dir flag instead of the --profile flag. You can then use this in your i3 config file to make different chrome profiles appear on different workspaces:

exec --no-startup-id i3-msg 'workspace 2; exec google-chrome --user-data-dir=~/chrome-private'
edit flag offensive delete link more

Comments

Thank you very much. It seems to have worked!

mbs gravatar imagembs ( 2014-04-18 14:07:40 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-16 08:45:43 +0000

Seen: 527 times

Last updated: Apr 17 '14