Main index > About new desklets > Arch Linux package desklet

By cs-cam (Desklet Author), on Wed Apr 13 03:49:50 2005: Arch Linux package desklet.

Arch Linux uses pacman for it's package manager, I'm just writing a desklet that'll display a little nifty info about the OS, version, number packages installed etc. There is a Python library for pacman, I want to use this to check for any updates and even be able to do a system-wide update through the desklet. This is actually easy enough from what I can gather, my problem is I want to have like a dynamic area, click a button and it says "connecting to servers", "syncing with servers" "x packages need to be updated", that sort of thing. Having no experience with imlib I had a play, it just writes the text over the old text which is an understandable result just not the desired one. Anyone got any suggestions for how I could go about maybe removing the old text or painting a blank transparent rectangle over the text (that last bit sounded weird). Does anybody actually get what I mean?

Suggestions would be great :)

By syfou (Core Developer & Desklet Author), on Wed Apr 13 18:17:24 2005, last edited on Wed Apr 13 21:00:31 2005.

Painting over an old text with "transparent black" (or any transparent color, in fact) to make sure it is removed from the screen is the right way to go. Maybe did you just forget to set the context blend state right before calling the fill_rectangle() operation?

Code:


adesklets.context_set_blend(False)


It is needed because a fully transparent color will of course be applied by default relative to its alpha weight, wich is none. :-)
If you want to see a working example of this, just try out the test/widgets.py example from base package.

I guess you will need the ability to printout multi-lines strings? You might want to have a look at torsmotoy regarding this, since the TorsmoString class from torsmotoy.py implements this.

Finally, it seems to me that what you are planning to do is in essence very similar to this (read the whole thread). What do you think?

By cs-cam (Desklet Author), on Wed Apr 13 20:31:16 2005.

Thanks for the tips, I will have a look around at what you mentioned for ideas.

Quote:


Finally, it seems to me that what you are planning to do is in essence very similar to this (read the whole thread). What do you think?

Exactly where I got my idea except I don't really want as much detaill. Maybe further down the track I'll change my mind on that though ;)

By syfou (Core Developer & Desklet Author), on Sun May 1 13:24:16 2005.

Hi cs-cam,

when are you submitting your package manager front-end for inclusion on adesklets web site? :-) I saw you posted a screenshot with it...

There are many reasons to do so:

Besides, if you read them carefully, it won't take too much of your time either.

By cs-cam (Desklet Author), on Sun May 1 19:25:55 2005.

I'm not particularly fussed on submitting it for anything official yet as it has far too many flaws for my liking. While it works, it's not threaded so there's an initial wait. Might be acceptable but I'd like to fix it if I can figure it out/. It needs to be run as root for certain filesystem permissions, again not something I'm particularly happy with but something I am working on. That's a problem with libpypac which is what the desklet uses so I'll have to work with someone else's schedule to get that done if it's even possible. As a result of needing to be run as root, it's currently not feasible to have it in .adesklets because it errors out when run as a user.

Anyway, I'm happy to submit an early version if you think I sould, but i's still got a lot of issues that I want to address.

By syfou (Core Developer & Desklet Author), on Sun May 1 19:49:17 2005.

I understand your reasons... Not everyone suscribe to the "rekease early, release often" mantra. ;-)

As for your permission problem, have you considered some kind of wheel group? That's often a good way to give access to restricted resources without using SUID executables and such...

[EDIT]
I just though I should point out there is page containing Cameron Daniel nice desklet job: http://camdaniel.com/desklets/. Hope he will not mind me publisizing it. :mrgreen:


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.