Send command to i3 after clicking a link?

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:

  1. Send a command to i3 over IPC
  2. Edit the xdg-open script (suggested by ChatGPT)

My concerns with each:

  1. 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.

  2. 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.

Welp, turns out there is a setting for this:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.