The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

is it possible to focus a window by name / id using i3-msg?

asked 2012-12-13 16:56:12 +0000

ingo gravatar image


is it possible to focus a specific application window by internal id / name, using i3-msg?

I've tried:

i3-msg '[id="135748312"] focus'

which gives


but the window is not focused (or at least not shown). It is a window on the same workspace, I would like to be able to switch workspaces at the same time.

(I know that

i3-msg workspace 9 focus


edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2012-12-14 20:54:03 +0000

Michael gravatar image

As explains:

id Compares the X11 window ID, which you can get via xwininfo for example.

con_id Compares the i3-internal container ID, which you can get via the IPC interface. Handy for scripting.

So, just use i3-msg '[con_id="135748312"] focus'

edit flag offensive delete link more


Thanks, that's it :-)

ingo gravatar imageingo ( 2012-12-16 11:32:59 +0000 )edit

Question Tools


Asked: 2012-12-13 16:56:12 +0000

Seen: 2,101 times

Last updated: Dec 14 '12