So I’m trying to set up a workflow based on 1 dedicated app per workspace.
For example, my web browser (vivaldi) will be on workspace 1 and discord will be on workspace 2. I’m on workspace 2 chatting on discord when a url I’m interested in is posted. I click on it and it is opened in vivaldi on workspace 1, but I do not automatically switch to the vivaldi workspace.
I would like for i3 to automatically switch to the workspace where the link was opened.
I’ve been doing some research and there seems to be 2 options:
- Send a command to i3 over IPC
- Edit the xdg-open script (suggested by ChatGPT)
My concerns with each:
If I were to use WebSockets, I think I would need to set up a http server to receive messages from Chromium, translate them to IPC and then relay it i3. The alternative is hacking Chromium to communicate with i3 directly. Both of these seem to complex for my immediate needs and limited skill set.
Editing xdg-open to communicate with i3 seems like the better option, but I’m concerned with editing system files. Would any changes I make be overwritten during an update?
Anyways, I’m reaching out for ideas about how best to accomplish this behavior.