freememapplet_tray - a different approach

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

freememapplet_tray - a different approach

#1 Post by gyro »

This is not a replacement for 'freememapplet_tray'.
Currently it's just a proof of concept test console program called 'freememapp'. Run it in a console and it will display the appropriate 'freememapplet_tray' tooltip message on the console.

When working on 'freememapplet_tray' for the 'savefolder using symbolic links' project, I was intrigued by the following comment in the code:

Code: Select all

    //read free personal storage...
    //would prefer to do this entirely in C code...
So that's what I've done.

I hope others might test running this under different puppies and in different pupmodes.

Its compiled on Dpup Exprimo 5.X.3.4.12, but it runs successfully on all my other puppies.

Note: I'm not trying to become the maintainer of 'freememapplet_tray'. I just want to let the appropriate person know that there is another way.

gyro
Attachments
main.c.gz
gunzip it to produce the source file.
(907 Bytes) Downloaded 303 times
freememapp.gz
gunzip it to produce the binary file.
(2.25 KiB) Downloaded 305 times

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#2 Post by Keef »

lupusuper2 5.2.8.7 k3.2.48 beta (with Luci_SaveDir-6.pet)

Code: Select all

# ./freememapp 
11G personal storage, free space 1.9G
No problems here.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post by technosaurus »

There is already a tool to use the tooltip in a tray applet... you could use the data to select/generate an image and choose/write a gtkdialog app to run on left/right click.

Its called
SIT (Simple Icon Tray)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#4 Post by gyro »

@Keef,
Thanks for the feed back.

@technosaurus,
Sorry, I don't understand your comment. If I was trying to make a 'tool', it would be a replacement for 'freememapplet_tray'.
The question here is if the algorithm used in this code is a suitable replacement for the algorithm used in 'frememapplet_tray' v2.5?

So, the questions are:
1) Does it run successfully?
2) Does it's numbers match those of current 'freememapplet_tray'?

gyro

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

Good idea...there are a few functions in puppy that could benefit from some c programming...I can only slowly hack the stuff unfortunately.

I use older xfce4 on puppy and it comes with a space monitor which I point at '/' and that works a treat... changes colour as space gets low and pops up warnings...all with non existent cpu usage....again its a c applet like yours.

Those drive icons had a c replacement written...works great on lucid...the scripts mike yuccy and significant cpu spikes on older machines .

mike

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#6 Post by technosaurus »

gyro wrote:@technosaurus,
Sorry, I don't understand your comment. If I was trying to make a 'tool', it would be a replacement for 'freememapplet_tray'.
The question here is if the algorithm used in this code is a suitable replacement for the algorithm used in 'frememapplet_tray' v2.5?
with the algorithm separated out there is no need for a separate freememapplettray at all. SIT automatically handles updating icons and tooltips for many "applets" in a single gtk2 process...
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#7 Post by gyro »

I'm going to leave this now as a suggestion to the maintainer of "freememapplet_tray.c".

gyro

Post Reply