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

IPC event on 'window got focus'

asked 2014-02-02 19:19:42 +0000

krvkir gravatar image

I need to run a shell command when the window with certain app gets focus. Is there a proper way to do this? If not, are there some reasons to not doing this (too slow to generate events on every window focus or so)? If there are no reasons, what is the right way to implement such a feature? (I'll try to do it myself.)

(More detailed, I have two keyboard layouts (us and ru) and Emacs which bindings work only when us layoud is active. I want to switch the system layout to us when Emacs window gets focus.)

PS If you see some other (more easy or more proper) way to solve my problem, please write it down.

edit retag flag offensive close merge delete

Comments

Someone is working on this now. See https://github.com/i3/i3/issues/1168

TonyC gravatar imageTonyC ( 2014-02-04 17:42:45 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-03 21:45:51 +0000

joepd gravatar image

No, as of yet, this is not possible. The available subscribable events are listed in the IPC documentation. Word goes that (good) patches to add this functionality will be accepted.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-02 19:19:42 +0000

Seen: 149 times

Last updated: Feb 03 '14