View previous topic :: View next topic |
Author |
Message |
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Tue Aug 17, 2004 8:07 pm Post subject: |
|
|
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. _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Tue Aug 17, 2004 8:19 pm Post subject: |
|
|
alright, i added bar support. Seems that the fs_bar option would draw how much your thing is filled, so i added a fs_bar_free option in addition to fs_used_perc. I'm not sure if it's useful but might as well complete the suite, right?
Here's a patchfile for it:
http://d.minuslab.net/torsmomod/torsmo_addused.patch
this is WITHOUT the mozilla patch, btw. killfire, check it out and make sure it works, and then i'll submit a patch to the author. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Tue Aug 17, 2004 8:21 pm Post subject: |
|
|
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. |
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. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Tue Aug 17, 2004 8:27 pm Post subject: |
|
|
good idea!
thats what they should have done originaly, made fs_free_bar and fs_free_perc, or they should have done fs_used_bar and fs_used_perc... it doesnt make any sense to combine them....
am building it now, will post back when it works!
killfire
[EDIT[
it works perfectly. kind of confusing 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]
[EDIT2]
also, i just checked it against the mozilla patch, both work fine together.
oh, and tarzan: is it possible for you to post your diff in unicode format (diff -u old.file new.file)
id like to see if your code is compatible with the other patches.
thanks
killfire
[/EDIT]
Last edited by killfire on Tue Aug 17, 2004 8:37 pm; edited 1 time in total |
|
Back to top |
|
|
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Tue Aug 17, 2004 8:34 pm Post subject: |
|
|
killfire- that's exactly what I was thinking. I'll have to take a look at your patches and add that stuff.
Are you guys posting your stuff to the sourceforge page? If not, well then you should! (That's where the support for reloading the config by #killall -SIGHUP torsmo came from) _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Tue Aug 17, 2004 8:40 pm Post subject: |
|
|
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] |
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.
i don't think ebuilds have anything to do with this, an ebuild just discusses where to get the .tar.gz file and unpacks it and stuff, at least taht's what i thought. i think we should probably submit full patches to the author's site, let him release it and then portage will pick it up.
something like that.
@tarzan420:
haven't yet. i'm going to make that change with the names, write up a new torsmorc example (to have these new htings in the comments), and then send it in. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Tue Aug 17, 2004 8:59 pm Post subject: |
|
|
here, i have a patch to patch the ebuild, so that in the src_unpack stage, it (should have not tested it) patch the file, which is your patch. change the name though.
i think it will only work after the mozilla patch has been applied.
here are the two files:
http://www.sover.net/~ljohnstn/torsmo-0.17-addused.ebuild.patch
http://www.sover.net/~ljohnstn/torsmo-0.17-addused.patch
what you need to do, is move the second patch (the actual patch) to the /usr/portage/app-admin/torsmo/files directory, and then apply the first patch when in the /usr/portage/app-admin/torsmo directory, and then an emerge torsmo should do it..
should, i will test this right now.
[EDIT]
somethign in my code is wrong, i shoudl really read up on ebuilds. the ebuild patch renders the ebuild dead.... DONT USE IT!
@tarzan:
thanks for the changed diff file!
[/EDIT]
if it works, then we could subbmit this to portage, like affinity did originally
killfire
(editted because i messed up the portage path)
Last edited by killfire on Tue Aug 17, 2004 9:07 pm; edited 1 time in total |
|
Back to top |
|
|
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Tue Aug 17, 2004 9:02 pm Post subject: |
|
|
(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. _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Tue Aug 17, 2004 9:11 pm Post subject: |
|
|
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. |
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. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
affinity n00b
Joined: 01 Jul 2004 Posts: 66
|
Posted: Tue Aug 17, 2004 9:14 pm Post subject: |
|
|
You might want to get rid of this:
Code: | - r = sscanf(arg, "%d %d %d", &a, &b, &c);
+ r = sscanf(arg, "%d %d %d", &a, &b, &c); |
and when the ebuild was added to portage unpack ${P}.tar.gz was changed to unpack ${A}.
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 ... |
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). |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Tue Aug 17, 2004 9:19 pm Post subject: |
|
|
i would agree. because includeing all the patchs (and i checked, and your patch is compatible with the rest, but unfortunately i dont even have my fonts set up, so i dont know if they are working... works though) is around 2400 lines... thats a bit to dig through!
maybe we shoudl try to get in contact with the developer, and try to figure out a way to reconstruct the code base....
because the app is a great idea, and easy to add to!
killfire |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Tue Aug 17, 2004 9:31 pm Post subject: |
|
|
affinity wrote: |
You might want to get rid of this:
Code: | - r = sscanf(arg, "%d %d %d", &a, &b, &c);
+ r = sscanf(arg, "%d %d %d", &a, &b, &c); |
**snip**. |
i have updated that, nice catch...
killfire |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Tue Aug 17, 2004 9:54 pm Post subject: |
|
|
killfire wrote: |
i have updated that, nice catch...
killfire |
yeah i kept trying to fix that but i kept making it worse! musta slipped on a space bar one time.
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. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Tue Aug 17, 2004 9:57 pm Post subject: |
|
|
ok, xft update!
what works:
widths are calculated more-or-less correctly
fonts are loaded from the command line or the config file
what doesn't
colors are not yet supported - black hardcoded
it's slow (partially due to my current color (or lack thereof) implementation)
I'm gonna hack on this at home tonight, and hopefully i'll have made more progress.
If anyone is interested, the patch (against 0.17) is now available on the sourceforge page (under patches)
i should grab the cvs as well.. _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
affinity n00b
Joined: 01 Jul 2004 Posts: 66
|
Posted: Tue Aug 17, 2004 10:19 pm Post subject: |
|
|
The CVS version already includes Xft support (with support for colors/alpha). |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Wed Aug 18, 2004 2:35 am Post subject: |
|
|
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. |
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 |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Wed Aug 18, 2004 5:51 am Post subject: |
|
|
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 |
sounds good. looks like the cvs has a lot of the stuff we're trying to implement, haha!
speaking of cvs, do you have an aversion to installing it? you don't ahve to set up a cvs server, you can just use the command line tool. it's all rather lightweight, i think. i used it to hack on the xfce source back in my xfce days, coul dnever get it to build properly though.. oh well. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Wed Aug 18, 2004 1:24 pm Post subject: |
|
|
umm, yeah, i figured that out when I grabbed the cvs sources, and started adding my changes.
Oh well, at least I learned a little about x programming...
note to self: work on the cvs sources next time.... _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Wed Aug 18, 2004 1:41 pm Post subject: |
|
|
@nightmare:
im on dialup so i did an emerge -pv cvs, and like usual, its completely wrong. it said it was 4,500 k, which takes a bit of time for me )which was why i was trying to find another way) but it turns out that its only 2,300k, which i can do without too much dificulty!
now openoffice is where i run into the most trouble
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.
killfire |
|
Back to top |
|
|
affinity n00b
Joined: 01 Jul 2004 Posts: 66
|
Posted: Wed Aug 18, 2004 1:58 pm Post subject: |
|
|
killfire 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. |
torsmo-mozilla.patch
torsmo-addused.patch:
Code: | --- 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;
|
Last edited by affinity on Sun Aug 22, 2004 2:34 am; edited 1 time in total |
|
Back to top |
|
|
TheWoopWoop n00b
Joined: 10 Feb 2004 Posts: 30
|
Posted: Thu Aug 19, 2004 2:02 am Post subject: |
|
|
This is beautiful...
Wow.
I'm still hoping double buffering gets implemented sometime but torsmo rocks. |
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Thu Aug 19, 2004 9:06 pm Post subject: |
|
|
just an update.
i finally got cvs working (someone shoudl make an abridged version of the man page, its monstrous!) and got a copy of torsmo cvs
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
obviously, this needs to be run in the directory where cvs put torsmo, and my version of torsmo cvs is as of this afternoon.
also, im working on changing the battery status to have as one option the state, and the other the percent. (i would rather have the choice my self)
also, how do you get xft fonts working on torsmo cvs?
i tried, but it came up flat.
thanks,
killfire |
|
Back to top |
|
|
affinity n00b
Joined: 01 Jul 2004 Posts: 66
|
Posted: Thu Aug 19, 2004 9:36 pm Post subject: |
|
|
I already did that.
killfire wrote: | also, how do you get xft fonts working on torsmo cvs? |
Code: | ./autogen.sh
./configure --enable-xft
make |
and put these in your .torsmorc
Code: | # Xft font when Xft is enabled
xftfont courier-12
# Text alpha when using Xft
xftalpha 0.8 |
|
|
Back to top |
|
|
killfire l33t
Joined: 04 Oct 2003 Posts: 618
|
Posted: Thu Aug 19, 2004 9:59 pm Post subject: |
|
|
affinity wrote: |
I already did that.
|
oops....
affinity wrote: |
killfire wrote: | also, how do you get xft fonts working on torsmo cvs? |
Code: | ./autogen.sh
./configure --enable-xft
make |
and put these in your .torsmorc
Code: | # Xft font when Xft is enabled
xftfont courier-12
# Text alpha when using Xft
xftalpha 0.8 |
|
thanks, i put the stuff in, but i didnt make the configrue correctly.
[EDIT]
umm, i did that, and the fonts work, but they are huge!
i used the same settings ive used for the same fonts, and they come up about 3 times as large, its hideos!
how can i fis this?
[/EDIT]
will post when i get the battery things working (i would like to separate the status and percent, and to add a battery bar)....
killfire |
|
Back to top |
|
|
tarzan420 Tux's lil' helper
Joined: 05 Jul 2003 Posts: 81 Location: Fairbanks AK
|
Posted: Fri Aug 20, 2004 1:38 pm Post subject: |
|
|
with xft you can change the font size as part of the name, so specifies a size 12 courier font, while something like Code: | xftfont QSwitch Ax-8 | (Yes, it works without quotes. Infact, it doesn't work with them.) Specifies size 8 QSwitch Ax.
@TheWoopWoop:
I'd also like to see doublebuffering, maybe i'll look into it (and get rid of the horrible flicker...) _________________ The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|