'hacking' some of XFCE goodies
Łukasz Hejnak <[email protected]>
| Newsgroups | gmane.comp.desktop.xfce.goodies.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi I wanted to show You some of the xfce goodies I managed to tweak a little lately. Thought it may be usefull for someone else, though it isn't probably the best way to achieve my demands, as I'm not much of a C coder ;] Anyway here's what i've done.. xfce4-cpugraph-plugin: http://szift.org/xfce/xfce4-cpugraph-plugin-szifted.tar.bz2 The graph window is ok, but except knowing what's the current cpu usage, I wanted to have a little 'top' over there too, so I added it to the tooltip info. Now when You go over the plugin window, You can see the usage % and the names of 3 most active processes at the moment. This one isn't too clean though. I didn't know how to easily gather the data, that top usually displays, so I used top to do it. There's a call like this (in the UpdateTooltip()) exec_cmd (cmd->str, FALSE, FALSE); where cmd->str is "/usr/local/bin/top_go" and where top_go is as simple as cat > /usr/local/bin/top_go << "EOF" top -b -n 1 >& /tmp/top.lista EOF chmod +x /usr/local/bin/top_go This creates the file /tmp/top.lista which I then parse to get the data I'm interested in. xfce4-fsguard-plugin: http://szift.org/xfce/xfce4-fsguard-plugin-szifted.tar.bz2 The changes made here, are making it not only display one filesystem, but cycle trough a (hardcoded for now) list of filesystems. The count is in #define ITERMAX and the list is easy to find in the plugin_check_fs() (if (plugin->iter==0) and so on). It would be nice to make the list available to be modified trought the options window, and to make the icon bring more info, some text floating over like hda1, hdb5 etc. Other changes I made, but are still causing me errors and not working like they should. I modified the xfce4-systemload-plugin and xfce4-netload-plugin to read info from local files, in the /tmp dir. The files are updated by another app, a server-client team, that transmits the required data from my server to my workstation. This way I can see the cpu/mem/swap usage and net traffic of my server on my desktop. The error here, is the server-client team. I get some errors in that code and can't seem to find the fix lately, even though it worked fine before ;] And finally another change to the xfce4-systemload-plugin to instead of displaying the local swap, display the seti client progress. So I got the bar for 0%->100%, and in the tooltip I get info on progress, current WU count and time used so far to do the computing in hours, minutes and seconds, as displayed by the client after sending a result header. If anyone would like me to do so, I will make those last three available also, but I'm warning that those tend to crash my panel once a while.. -- With regards Łukasz Hejnak