Discussion:
[i3] IPC window focus change event
Marco Hunsicker
2014-01-18 22:49:04 UTC
Permalink
Howdy,

first and foremost thanks for all the work that went into i3! It seems
to hit just the right sweet spot between feature set, ease of use,
documentation and extensibility.

While searching for solutions to display the title of the focused window
in the bar (I have three monitors and plenty of horizontal space that
should be put to good use), I was not able to come up with a fully
satisfying solution.

But I found an old thread that provides some useful code for such a
feature: "Added 'focus' IPC message/event" by Kevin Murphy,
<http://infra.in.zekjur.net/pipermail/i3-discuss/2012-November/001039.html>

With such an event it should be possible to keep the general refresh
rate low and still have the title updated immediately after focus change.

From the reply it seems that such an enhancement could make it into the
core. If the mentioned shortcomings could be fixed, would you be willing
to accept a patch? Thanks.

Cheers,

Marco
Michael Stapelberg
2014-01-19 08:15:11 UTC
Permalink
Hi Marco,
Post by Marco Hunsicker
From the reply it seems that such an enhancement could make it into the
core. If the mentioned shortcomings could be fixed, would you be willing
to accept a patch? Thanks.
Yes. Please submit a fixed version to http://cr.i3wm.org/ and read
http://build.i3wm.org/docs/hacking-howto.html first :).
--
Best regards,
Michael
Marco Hunsicker
2014-01-19 10:08:43 UTC
Permalink
Hello Michael,

thanks for your quick action!
Post by Michael Stapelberg
Post by Marco Hunsicker
If the mentioned shortcomings could be fixed, would you be willing
to accept a patch?
Yes. Please submit a fixed version to http://cr.i3wm.org/ and read
http://build.i3wm.org/docs/hacking-howto.html first :).
OK. I'm not much of a C hacker and it will probably already take some
time to even get the sources to compile, but once I'm done I will make
sure that the little patch goes to the mentioned channels.

Should I open a ticket with the tracker?

Cheers,
Marco
Michael Stapelberg
2014-01-19 10:16:48 UTC
Permalink
Hi Marco,
Post by Marco Hunsicker
Should I open a ticket with the tracker?
I don’t really think that’s necessary, but if you absolutely want to, go
ahead.
--
Best regards,
Michael
Marco Hunsicker
2014-01-20 06:10:49 UTC
Permalink
Hello Michael,
Post by Michael Stapelberg
Yes. Please submit a fixed version to http://cr.i3wm.org/
The patch has been submitted.

I've altered the naming of the event as the patch really deals with
window title changes. If there is interest for a window focus specific
change event, this could be added separately.

There is unfortunately no unit test. I don't speak Perl. The
documentation would need to be adjusted as well. I haven't looked into
that yet.

Feel free to contact me if there are any questions. Thanks.

Cheers,
Marco
Michael Stapelberg
2014-01-20 18:43:17 UTC
Permalink
Hi Marco,
Post by Marco Hunsicker
The patch has been submitted.
For the record: http://cr.i3wm.org/patch/384

I commented on the bug and expect further communication to happen there
instead of on this mailing list :).
--
Best regards,
Michael
Loading...