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

switch focus to given con_id via ipc command

asked 2013-04-28 12:45:54 +0000

visit gravatar image

Hi,

I'm currently trying to switch the focused window by sending a COMMAND to the ipc interface:

[con_id="135748312"] focus

The COMMAND returns [{"success":true}], but does not switch the window.

I've tried the same with i3-msg, and this is also not switching:

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

Any ideas on that?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-04-28 12:52:34 +0000

badboy_ gravatar image

You're sure you got the right id? (How did you get the id?) Picking a random id from i3-msg -t get_tree | json | grep '"id"', then doing the i3-msg "[con_id=...] focus thing works for me.

edit flag offensive delete link more
0

answered 2013-04-28 15:42:05 +0000

visit gravatar image

This was the issue. I used the value of window, not id. Thanks!

edit flag offensive delete link more

Comments

You can then use `i3-msg "[id=...] focus"`

badboy_ gravatar imagebadboy_ ( 2013-05-01 17:51:38 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-28 12:45:54 +0000

Seen: 141 times

Last updated: Apr 28 '13