SuperKaramba TuxBar with SMOOTH zoom

Karamba & Superkaramba

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5 .0
Description:

This is a NEW SuperKaramba version of TuxBar!

Now it has full SMOOTH zoom just like in MacOS X! The bar even grows and the icons move almost exactly as in OS X. See the power of SuperKaramba :)

Please make sure you are using SuperKaramba 0.17f or HIGHER! Notice the "f"!
The newest version of SuperKaramba speeds things up A LOT.

PS: You can steal the tuxbar.py to add parametric zoom to your own themes.
Last changelog:

17 years ago

2.0 - 0.17g:

You need this version if you have upgraded to SuperKaramba 0.17g - otherwise there are no changes.

auric

17 years ago

when you reload the TuxBar in Superkaramba, karamba crashes ...

I use Ctrl + R to reload

Report

FLouer

17 years ago

i wanna know how to make that the bar appear in my desktop automatically when i enter to linux ???

Report

auric

17 years ago

put a script like

-----
#!/bin/bash

karamba /path/to/tuxbar.theme
-----

in your $HOME/.kde/Autostart folder

Report

FLouer

17 years ago

i have mandrake 9.1 and i cant find that archive or folder...

i dont know where i have to put the code to auto run the tuxbarSuperKaramba....

Report

georgz

17 years ago

Which icons did you use for your screenshot?

Report

auric

17 years ago

Not offtopic, these are the icons just used for the Tuxbar ;-)

The icons themself are the TuxNtosh http://kde-look.org/content/show.php?content=5106

and TuxNtosh II http://kde-look.org/content/show.php?content=5772
icons

Report

bonega

17 years ago

Found some moveImage() that wasn't needed, I have commented them out.
Hope this can be read.

if (iconNum != currZoomedPic) or (reset == 1):
karamba.moveImage(widget, barimage, 60, 160)
karamba.moveImage(widget, barimageBig, 6, 62)

reset = 0
#karamba.moveImage(widget, images[currZoomedPic], (currZoomedPic*65)+35+60, 10)
karamba.moveImage(widget, imagesBig[currZoomedPic], (currZoomedPic*65)+35+60, 150)
if currZoomedPic != 0:
karamba.resizeImage(widget, imagesBig[currZoomedPic-1], 96, 96)
karamba.moveImage(widget, imagesBig[currZoomedPic-1], ((currZoomedPic-1)*65)+35+60, 150)
#karamba.moveImage(widget, images[currZoomedPic-1], ((currZoomedPic-1)*65)+35+60, 42)
if currZoomedPic != 7:
karamba.resizeImage(widget, imagesBig[currZoomedPic+1], 96, 96)
karamba.moveImage(widget, imagesBig[currZoomedPic+1], ((currZoomedPic+1)*65)+35+60, 150)
#karamba.moveImage(widget, images[currZoomedPic+1], ((currZoomedPic+1)*65)+35+60, 42)

Report

gordo

17 years ago

Great work, and very cool.
Like a couple other folks, I would suggest using parameters so you can support icons of multiple sizes (32x32 --> 64x64 for example) that come with various icon sets.

Report

djwilly

17 years ago

Some tips for this wonderful idea :)

First: Let's document your source code a little better... I just don't undesrtand what those conditions full of numbers are (ok, I see they are relative positions, but... where?). Use constants!! :)

Second: BOOST PERFORMANCE!!! If I had some idea about python i will fix it in a couple of hours, but i haven't. So I'll give you the solution for the slowness. You are calling lots of complex and unoptimized functions every time the mouse is over tuxbar. Well, here is the solution: Calculate all the resizes at the initialization of tuxbar (two seconds of CPU?), and store the results in an array. And in the function to handle the mouse movements, just copy the desired result without recalculating it thousands of times. Believe me, it should work :)

Three: Make it parametric. It should have a generic number of icons, and read a configuration from a text file, per example. That would be nicer for the newbiest.

Four: It's a shame that it uses fake transparency.... if it didn't,. it could be a perfect replacement for kicker (well, adding it a K menu, a clock...)!!!

Report

C

ageitgey

17 years ago

here's my responses:

First:

The source code to tuxbar.py is total crap. I just wanted to get an example widget out there. I banged it out in an hour or three. I fully intended to re-write it in some sort of coherent, parametric way.

Second:

You have to update it everytime the mouse moves because thats how the bar works. As far as unoptimized, it's not the python code thats the problem. The problems are definately in the actual super karamba redraw code and as you saw with 0.17e I'm improving it as I have time. The next version will definately double-buffer to reduce the load on the X server. It's no big deal, I just can't fix everything immediately. SuperKaramba didn't exist 3 days ago :)

Three:

Yep. See number one.

Four:

Yep... I think everyone wishes xfree would hurry up transparency support. But from the last status update I read, the way X is designed makes adding this a lot harder than it otherwise would be. I'm sure in time though...

Glad you otherwise enjoy it so far :)

Report

kola

17 years ago

>
>
Second: BOOST PERFORMANCE!!! You are calling lots of complex and unoptimized functions every time the mouse is over tuxbar. Well, here is the solution: Calculate all the resizes at the initialization of tuxbar (two seconds of CPU?), and store the results in an array. And in the function to handle the mouse movements, just copy the desired result without recalculating it thousands of times. Believe me, it should work :)


You have some good suggestions, but I am not so sure about the implementation of second one. Most of our comps are way too fast to make those small computations any big deal.

If you run top on my system, karamba cpu usage never exceeds 1.5%, it is X that hits 97-98% cpu. Seems to me, optimizations lie in icon rendering.

Probably his python code is not the answer. Solution lies in superkaramba code, to improve image display technique (i don't know.. double buffering or something)

Report

m3g4crux

17 years ago

I have tried the latest nvidia driver 4349 for my GeForce2 mx 400. Now the tuxbar goes really cool, still consums pretty much CPU resources (if moving around the bar too much), but now is great. On the other hand I find myself with a new problem. This nvidia module freezes my xfree 4.3 (and as far as I remember it used to do the same thing with xfree4.2) when trying to launch almost any application.
I am still amazed with this bar.. this superkaramba brings really nice posibilities when it comes to interacting with icons and all that. And this theme just demonstrates that clearly.
GOOD JOB.

Report

techniq

17 years ago

I have an XP 1800+ and Geforce 4 4600, and doesn't run slow at all (does spike my cpu to 100% if i move around alot, but doesn't even make my music jump). I am running the newest Nvidia drivers (the latest from the new script they have). I also turned on RenderAccel in my /etc/X11/XF86Config, although haven't tested it without it to see if it helps.

Great work btw, I've been waiting for this bar. Now just need a way to add applets it it ;)

Report

Kleggas

17 years ago

I noticed all ppl complaining about tux being slow uses amd Athlon, so I installed it on my friends computer and it was really, really slow. So either it has to do with your athlon, OR you use latest NVIDIA drivers for your cards, cuz those made both gnome2 and kde3.1 slow for me, then ppl in #slackware on freenode told me to use the previous version (download at nvidia site) and it worked great. everything is fast. So, there u have 2 possible problems, AMD or NVIDIA

Report

kola

17 years ago

Yes its very slow for me XP 2000+, NVidia GeForce4

There might be a coding solution.

Any python gurus here that can examine the code ? Or is it already optimized ? Or is it that python is just sooo slow?

It would be great if people proficient in python could comment about the code so that coding solution for tux-bar could be found or ruled out.

Report

C

ageitgey

17 years ago

The python code is fairly simple. It just calls the karamba functions to resize/move/etc the icons based on mouse movement. Actually its a little tricky because it uses two source icons for each icon to keep them looking decent at the larger sizes. But it's not un-optimized.

And python is pretty darn fast when it doesn't do the low-level calculations itself. All the karamba resize functions are written in native code (they call QT functions).

There must be some other issue with the Athlons. I'm pro-amd (even though i have an intel) and there is absolutely no reason why you shouldn't be able to run 10 tuxbars easily on an XP2000+ :) I mean one guy has this running on a 600mhz celeron.

I know some people with Athlons and I will try to run it on their computers. There must be something else going on here.

Report

ThatComputerGuy

17 years ago

FYI, I posted in a comment above (which probably won't be seen by now): In my case updating to the newest NVidia drivers fixed the problem right away on my Athlon system.

Report

djwilly

17 years ago

Well, i have what you call 'slow' computer, a 733Mhz P3. But, i'll tell you that it's the first desktop app i've tried that is slow on my machine. Games like tuxracer work at >75fps with a poor tnt2. Well, i think you should do some things for performance. And, if can't do it (that wouldn't be strange, python is extremelly unefficent), you should do a parallell post with those versions with only 3 states for us (those with !

Report

m3g4crux

17 years ago

It is incredibly nice...
Slow on my Athlon XP 1800+ (512 MB ddr 266) in mine it also goes to 100% just moving the mouse around the tuxbar.
It would be great to find a solution.
The other version, (the one which wasnt that smooth with the zoom) was also a little bit slow, although comparing to this one was fast enough. I am using debian sid, kde 3.1.1 using latest qt, python2.2. I have a GeForce 2 MX 400 with the nvidia driver 3123. Kernel 2.4.20, I have agp 4x, enabled the Fast Write for the graphics card. I also use xfree 4.3. Maybe python doesnt go that fast with Athlon XP please help us :-D.
Still looks cool. :-D (slow but cool)

Report

Snake74

17 years ago

with so much eyecandy to play with, awesome work, does anybody know if there is some way to start the karamba tux bar instead of kicker,that would just be my ultimate request

Report

C

ageitgey

17 years ago

You are out of your mine.. hehe..

But here's how to replace kicker (you can switch back later if you want)

cd ~/.kde/share/autostart
cp [KDE-dir]/share/autostart/panel.desktop ./

edit panel.desktop and change the line that says "Exec=kicker" to "Exec=/path/to/karamba /path/to/tuxbar.theme"


Thats it.

Replace [KDE-dir] with where you have kde installed. For example on Mandrake its "/usr" and on SuSE I believe its "/opt/kde3". And of course on the Exec line put the full path to karamba and tuxbar.

If you want to switch back to kicker, just:

rm ~/.kde/share/autostart/panel.desktop

and log back in.

Have fun :) Just make sure you do all this as the user your want to replace kicker for.

Report

ThatComputerGuy

17 years ago

I just built both this and SuperKaramba 0.17d today, so I have the latest versions of both packages, but TuxBar's scaling isn't smooth at all.

If I move from one icon to the next at a rate of say, 1 to 2 seconds travel time, I get about 6 to 8 distinct (read: choppy) movements of the icons.

I'm running this on Slackware 9 system, an XP 1600+ with a GF4 Ti4200 and 512MB ram. As soon as I place the mouse over the TuxBar, cpu usage by X shoots up to nearly 100% (90, 95, and even higher).

Anyone else seeing these problems? If the smoothness can be fixed, the TuxBar will be a VERY nice addition to KDE...

Report

ThatComputerGuy

17 years ago

Well, turns out it was Operator Error to some extent.. I was still running the *cough* 3123 NVidia drivers. Just upgraded 4349, and TuxBar is _much_ smoother. Damn near OS X smooth, I'd say.

Keep up the good work.

Report

xxxAlex83xxx

17 years ago

Very nice!
Can I suggest only one improvement ?
When the mouse is out the panel is in the standard position. But in the moment when the mouse entries in the panel the enlargment of the icons (and of the panel ) is imediate. For me is better if in the moment when mouse entries in the "hot area" the icon enlarge gradually..so the two moments (mouse out and mouse over) will linked perfectly together and smooth effect will very similar tu Mac OSX

Hi!
Alex

Report

Kleggas

17 years ago

my first reply didnt show up, hope this one does. If I move my mouse over the bar it works perfect without any "lag" and my cpu goes to 40%, only when I start moving my mouse like a maniac in 100km/h it goes up to 100%.

btw, great work, I really love this bar
keep up the good work

Request: maby a systray? :)

Report

17 years ago

2.0 - 0.17g:

You need this version if you have upgraded to SuperKaramba 0.17g - otherwise there are no changes.

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.17g
updated Apr 23 2003
added Apr 20 2003
downloads 24h
0
mediaviews 24h 0
pageviews 24h 1