<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>i3 FAQ - Individual question feed</title><link>https://faq.i3wm.org/questions/</link><description>Frequently asked questions and answers about the i3 window manager</description><atom:link href="http://faq.i3wm.org/feeds/question/3343/" rel="self"></atom:link><language>en</language><copyright>Copyright i3, 2012</copyright><lastBuildDate>Tue, 04 Feb 2014 17:42:45 +0000</lastBuildDate><item><title>IPC event on 'window got focus'</title><link>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/</link><description>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.</description><pubDate>Sun, 02 Feb 2014 19:19:42 +0000</pubDate><guid>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/</guid></item><item><title>Comment by TonyC for &lt;p&gt;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.)&lt;/p&gt;

&lt;p&gt;(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.)&lt;/p&gt;

&lt;p&gt;PS If you see some other (more easy or more proper) way to solve my problem, please write it down.&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/?comment=3363#comment-3363</link><description>Someone is working on this now. See https://github.com/i3/i3/issues/1168</description><pubDate>Tue, 04 Feb 2014 17:42:45 +0000</pubDate><guid>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/?comment=3363#comment-3363</guid></item><item><title>Answer by joepd for &lt;p&gt;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.)&lt;/p&gt;

&lt;p&gt;(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.)&lt;/p&gt;

&lt;p&gt;PS If you see some other (more easy or more proper) way to solve my problem, please write it down.&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/?answer=3354#post-id-3354</link><description>No, as of yet, this is not possible. The available [subscribable events are listed in the IPC documentation](http://i3wm.org/docs/ipc.html#_available_events).  Word goes that (good) patches to add this functionality will be accepted. 

</description><pubDate>Mon, 03 Feb 2014 21:45:51 +0000</pubDate><guid>https://faq.i3wm.org/question/3343/ipc-event-on-window-got-focus/?answer=3354#post-id-3354</guid></item></channel></rss>