Re: [i3] tray_output for primary display

  • From: Michael Stapelberg <michael@xxxxxxxx>
  • To: i3-discuss <i3-discuss@xxxxxxxxxxxxx>
  • Date: Sun, 18 Mar 2012 18:09:17 +0100

Hi José,

Excerpts from José Luis Pereira's message of 2012-03-18 14:34:43 +0100:

Thanks for your anwer. I would like to implement the feature, i have fairly
Awesome!

good C knowledge for this. Would you give me some guidelines?
I have been looking into the code and i found out that the modification
should be in xbc.c on i3bar source, am i right?
Yes, partly:

Since i3bar uses IPC and doesn’t query RandR directly, I recommend introducing
a new boolean member in the IPC reply for the get_outputs message (see i3-msg
-t get_outputs), called "primary". Then, make i3bar handle "primary" as a
special value (case-insensitively) in i3bar/src/xcb.c.

Feel free to send patches to this mailing list for review and feel free to drop
by on IRC to clarify any questions you might have.

Best regards,
Michael

Other related posts: