Open p00f opened 1 year ago
Hi.
It looks like stray
uses tokio
, so the first step would be to start using tokio
ourselves (which I used to do at some point but removed (https://github.com/MaxVerevkin/i3bar-river/commit/91381b2c1bb0ee5cb4755ac80769a7838874bbe6) because it wasn't really necessary at that point).
Then you can create a tray
module, in which you will keep track of the tray state.
To draw an icon, you will need to create a Surface
, and then
cairo_ctx.set_source_surface(&surface, x, y).unwrap();
cairo_ctx.paint().unwrap();
I see, thanks
On Fri, 12 May 2023 at 12:32, Max Verevkin @.***> wrote:
Hi.
It looks like stray uses tokio, so the first step would be to start using tokio ourselves (which I used to do at some point but removed (91381b2 https://github.com/MaxVerevkin/i3bar-river/commit/91381b2c1bb0ee5cb4755ac80769a7838874bbe6) because it wasn't really necessary at that point).
Then you can create a tray module, in which you will keep track of the tray state.
To draw an icon, you will need to create a Surface https://docs.rs/cairo-rs/0.17.0/cairo/struct.Surface.html, and then
cairo_ctx.set_source_surface(&surface, x, y).unwrap(); cairo_ctx.paint().unwrap();
— Reply to this email directly, view it on GitHub https://github.com/MaxVerevkin/i3bar-river/issues/7#issuecomment-1545272786, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWNSZ3JQ2VZOL3VI6TBFOTXFXOBXANCNFSM6AAAAAAX7BPAX4 . You are receiving this because you authored the thread.Message ID: @.***>
So, a high-level plan can be
tokio
.
I'm willing to work on this, can you tell me how to start? I found https://docs.rs/stray/0.1.3/stray/message/tray/struct.StatusNotifierItem.html which returns the icon name and/or the icon pixmap, how do I actually draw these?