i3-extras icon indicating copy to clipboard operation
i3-extras copied to clipboard

Updating icons and higher optimisation patch for v4.12

Open ashinkarov opened this issue 9 years ago • 6 comments

Rebasing and xbm-icon gcc-higher-opt patches to version 4.12.

ashinkarov avatar Mar 22 '16 20:03 ashinkarov

@Airblader, can you help with porting the icon patch to the cairo-based drawing that you have introduced?

Also, would you be interested to include this permanently in i3-gaps?

ashinkarov avatar Mar 22 '16 20:03 ashinkarov

can you help with porting the icon patch to the cairo-based drawing that you have introduced?

Yes, I've commented on the issue for this already. I'm just currently on vacation.

Also, would you be interested to include this permanently in i3-gaps?

Not really. For one, I don't really like the quality of the patch. But even when porting it entirely to cairo and a clean base, I don't see the value of icons in a fork that currently forces you to disable titlebars. Once that is fixed, I would probably consider it.

Airblader avatar Mar 22 '16 20:03 Airblader

@Airblader, I think you are confusing the patches. I am talking about the xbm icons in the i3bar, not in window titles. This is a different request :) And all of this surely waits till you'll come back from your vacation.

ashinkarov avatar Mar 22 '16 20:03 ashinkarov

I think you are confusing the patches.

It seems that way. :) I don't really want that in i3-gaps either, though, because I think most usecases can be covered with pango and iconic fonts and the maintenance cost is higher than the additional benefit; truthfully, I think i3bar would most benefit from a rewrite / replacement.

Anyway, about the patch (and this applies to the other as well), currently i3 supports both the old XCB and the new cairo rendering via build flag. So rebasing these patches properly means having to introduce new functions in libi3/draw_util.c which implements both. For the XCB path, one could use the mechanisms from the existing patches. For the cairo path (the more interesting one), one will have to figure out the cairo equivalent on how to implement these patches.

I will gladly help out, but I will also give a disclaimer that I don't just have all the time in the world once my vacation ends, so anyone who is sufficiently experienced or willing to should feel motivated to look into this. I think looking at draw_util should give a good understanding of how rendering in i3 works now. The idea is simply to have the entire rendering abstracted away in there and split it into the XCB and the cairo path. The actuall callers shouldn't care whether XCB or cairo is used.

Airblader avatar Mar 22 '16 20:03 Airblader

I don't really want that in i3-gaps either, I think i3bar would most benefit from a rewrite / replacement.

I see and I share your point.

I will gladly help out, but I will also give a disclaimer that I don't just have all the time in the world once my vacation ends.

Sure, I perfectly understand this. As for the drawing part, I understood the intention of the rewrite and I see how the draw_util_* functions work. My problem is that I don't know how to put an image or a pixel in cairo world. So, if you could provide a draw_util_* wrapper around xcb_image_put, that would be a fabulous start.

ashinkarov avatar Mar 22 '16 21:03 ashinkarov

My problem is that I don't know how to put an image or a pixel in cairo world. So, if you could provide a draw_util_* wrapper around xcb_image_put, that would be a fabulous start.

Well, but exactly that is the main work to do here. :) I didn't know anything about cairo before either; it's not that hard to learn. As a hint, it's probably worth looking at client.c in awesome's code since it uses icons + cairo.

Airblader avatar Mar 23 '16 01:03 Airblader