yeah, did you check the way the mozilla support patch works? there's a patchfile for the ebuild as well, which if you have mozilla in your use flags, that support will be added. When your xft stuff gets patched, if the user has xft in their use flags, then it will compile with it. you would need a ./configure option set up tho, i don't know how to do that yet.tarzan420 wrote:Font is QSwitch Ax
new screenie! Width issues fixed.
My idea is that the user (or package manager, etc...) will be able to do something like ./configure --with-xft , and then compile torsmo with or without xft support. Thus, all the code i've added is surrounded by lots of #ifdef XFT's...
The diff will be in your inbox shortly - I feel no need to post it here.
well, i was thinking about renaming it, but i didn't want to break compatability with older versions. maybe i could add another one which would change the bar to a meaningful name, and keep the older one.killfire wrote: [EDIT[
it works perfectly. kind of consuing though, when i have right next to eash other;
${fs_free_perc /}% ${fs_bar /}
${fs_used_perc /}% ${fs_bar_free /}
but its good to give options....
do you know how to write ebuilds?
because then you could write a patch to the ebuild, in order to patch the install... maybe ill look into that....
[/EDIT]
i agree as well. i don't want to hijack this dude's project, but i would so want to make it object oriented with some inheritance for the differnet types of stuff displayed. broken apart in multiple files of course. maybe we can fork it? hah, that'd be funny.tarzan420 wrote:(i think this conversation really needs to take place w/ some other people as well [like the orig. author of torsmo...])
But here's some food for thought:
How should torsmo grow? As is evidenced by this tread, adding functionality to torsmo is not too difficult, so I imagine the options for torsmo will grow, rivaling that of gkrellm, gdesklets, etc... However, If all the stuff is coded into torsmo.c, the file fill get huge. But, there's not infrastructure in place to deal with modularity, so ...
I don't have the answer, but I think this issue needs to be brought to serious consideration (perhaps it already is being considered) before torsmo grows too much.
just my 2 cents.
You might want to get rid of this:
Code: Select all
- r = sscanf(arg, "%d %d %d", &a, &b, &c);
+ r = sscanf(arg, "%d %d %d", &a, &b, &c);They have already begun splitting things out of torsmo.c (common.c freebsd.c fs.c linux.c mail.c mixer.c seti.c solaris.c torsmo.c varhash.c).tarzan420 wrote:How should torsmo grow? As is evidenced by this tread, adding functionality to torsmo is not too difficult, so I imagine the options for torsmo will grow, rivaling that of gkrellm, gdesklets, etc... However, If all the stuff is coded into torsmo.c, the file fill get huge. But, there's not infrastructure in place to deal with modularity, so ...
i have updated that, nice catch...affinity wrote:You might want to get rid of this:**snip**.Code: Select all
- r = sscanf(arg, "%d %d %d", &a, &b, &c); + r = sscanf(arg, "%d %d %d", &a, &b, &c);
yeah i kept trying to fix that but i kept making it worse! musta slipped on a space bar one time.killfire wrote: i have updated that, nice catch...
killfire
just letting you know, i posted the patch to sourceforge.nightmare wrote: killfire, i'll take it you are in charge of the patch now, which is good, because i'm lazy. Good to hear taht torsmo is split, you can probably grab it from cvs on sourceforge and then implement our changes, that would help the developers a lot.
killfire wrote:
just letting you know, i posted the patch to sourceforge.
hopefully it will be implemented into cvs. by the way, can i (easily) get the cvs version without installing cvs?
killfire
torsmo-mozilla.patchkillfire wrote:i think im going to get the mozilla patch onto the cvs sources, and try to port our other patch to whats left of the torsmo.c.
Code: Select all
--- torsmo-orig/torsmo.c 2004-08-16 21:14:08.000000000 +0300
+++ torsmo/torsmo.c 2004-08-18 16:50:42.014718392 +0300
@@ -301,9 +301,11 @@
OBJ_execi,
OBJ_fs_bar,
OBJ_fs_free,
+ OBJ_fs_bar_free,
OBJ_fs_free_perc,
OBJ_fs_size,
OBJ_fs_used,
+ OBJ_fs_used_perc,
OBJ_hr,
OBJ_i2c,
OBJ_kernel,
@@ -544,6 +546,17 @@
arg = "/";
obj->data.fsbar.fs = prepare_fs_stat(arg);
END
+ OBJ(fs_bar_free, INFO_FS)
+ obj->data.fsbar.h = 4;
+ if (arg) {
+ unsigned int n;
+ if (sscanf(arg, "%d %n", &obj->data.fsbar.h, &n) >= 1)
+ arg += n;
+ }
+ else
+ arg = "/";
+ obj->data.fsbar.fs = prepare_fs_stat(arg);
+ END
OBJ(fs_free, INFO_FS)
if (!arg) arg = "/";
obj->data.fs = prepare_fs_stat(arg);
@@ -560,6 +573,10 @@
if (!arg) arg = "/";
obj->data.fs = prepare_fs_stat(arg);
END
+ OBJ(fs_used_perc, INFO_FS)
+ if (!arg) arg = "/";
+ obj->data.fs = prepare_fs_stat(arg);
+ END
OBJ(hr, 0)
obj->data.i = arg ? atoi(arg) : 1;
END
@@ -930,6 +947,15 @@
(int) (255 - obj->data.fsbar.fs->avail*255/obj->data.fs->size));
}
}
+ OBJ(fs_bar_free) {
+ if (obj->data.fs != NULL) {
+ if (obj->data.fs->size == 0)
+ new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h, 255);
+ else
+ new_bar(p, obj->data.fsbar.w, obj->data.fsbar.h,
+ (int) (obj->data.fsbar.fs->avail*255/obj->data.fs->size));
+ }
+ }
OBJ(fs_free) {
if (obj->data.fs != NULL)
human_readable(obj->data.fs->avail, p);
@@ -951,6 +977,15 @@
if (obj->data.fs != NULL)
human_readable(obj->data.fs->size - obj->data.fs->avail, p);
}
+ OBJ(fs_used_perc) {
+ if (obj->data.fs != NULL) {
+ if (obj->data.fs->size)
+ snprintf(p, n, "%d",
+ 100 - ((int) ((obj->data.fs->avail*100) / obj->data.fs->size)));
+ else
+ snprintf(p, n, "0");
+ }
+ }
OBJ(loadavg) {
float *v = info.loadavg;

This is beautiful...affinity wrote:/usr/share/doc/torsmo-*/torsmorc.sample.gzett_gramse_nap wrote:I've just found out about this great little app... where can I find sample rc-files? If there is any?
http://lila-theme.uni.cc/rezza/configs/torsmorc.html
I already did that.killfire wrote:ported over the patchs (took more than i thought it would!)
and here they are:
mozilla patch:
http://www.sover.net/~ljohnstn/cvs_mozilla.patch
fs_used_perc and fs_bar_free patch:
http://www.sover.net/~ljohnstn/cvs_addused.patch
killfire wrote:also, how do you get xft fonts working on torsmo cvs?
Code: Select all
./autogen.sh
./configure --enable-xft
makeCode: Select all
# Xft font when Xft is enabled
xftfont courier-12
# Text alpha when using Xft
xftalpha 0.8oops....affinity wrote:I already did that.killfire wrote:ported over the patchs (took more than i thought it would!)
and here they are:
mozilla patch:
http://www.sover.net/~ljohnstn/cvs_mozilla.patch
fs_used_perc and fs_bar_free patch:
http://www.sover.net/~ljohnstn/cvs_addused.patch![]()
affinity wrote:killfire wrote:also, how do you get xft fonts working on torsmo cvs?and put these in your .torsmorcCode: Select all
./autogen.sh ./configure --enable-xft makeCode: Select all
# Xft font when Xft is enabled xftfont courier-12 # Text alpha when using Xft xftalpha 0.8
Code: Select all
xftfont courier-12Code: Select all
xftfont QSwitch Ax-8