Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

torsmo issues

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
332 posts
  • Page 1 of 14
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 14
  • Next
Author
Message
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

torsmo issues

  • Quote

Post by killfire » Wed Aug 11, 2004 12:21 am

i love torsmo, it is the most wonderful monitor ive seen yet...

my problem is, i would like it if it could check my pop3 email account, displaying only the number of new messages (much like gkrellm has),

and i would like it to display the percentage of used disk space, instead of free (when you have it along side of Used cpu, Used memory, Used swap.... it looks wrong)

is there any way to do this, or is there a simple way to use calls to the shell to accomplish this without Too too much wasted cpu?

i dont want to have a separate dock app or whatever, wasting space on my desktop, doing more than i want, just to solve these simple things.....

thanks,

killfire
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Mon Aug 16, 2004 12:58 pm

i'm interested, too
Top
malone
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Thu Feb 19, 2004 2:39 pm
Location: The p-n junction.

Re: torsmo issues

  • Quote

Post by malone » Mon Aug 16, 2004 1:33 pm

killfire wrote:i would like it to display the percentage of used disk space, instead of free
use

Code: Select all

${fs_used /}
You can use shell apps, just don't set the interval too short:

Code: Select all

${execi time app}
where time is the interval time in seconds.

HTH.
malone
Top
ett_gramse_nap
Apprentice
Apprentice
User avatar
Posts: 252
Joined: Wed Oct 01, 2003 6:54 am
Location: Göteborg, Sweden

  • Quote

Post by ett_gramse_nap » Mon Aug 16, 2004 2:17 pm

I've just found out about this great little app... where can I find sample rc-files? If there is any?
Don't bother!
Top
affinity
n00b
n00b
Posts: 66
Joined: Thu Jul 01, 2004 9:42 am

  • Quote

Post by affinity » Mon Aug 16, 2004 4:34 pm

ett_gramse_nap wrote:I've just found out about this great little app... where can I find sample rc-files? If there is any?
/usr/share/doc/torsmo-*/torsmorc.sample.gz
http://lila-theme.uni.cc/rezza/configs/torsmorc.html
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

Re: torsmo issues

  • Quote

Post by killfire » Mon Aug 16, 2004 5:21 pm

malone wrote:
killfire wrote:i would like it to display the percentage of used disk space, instead of free
use

Code: Select all

${fs_used /}
You can use shell apps, just don't set the interval too short:

Code: Select all

${execi time app}
where time is the interval time in seconds.

HTH.
thanks, but i have already found that, but what i was trying to figure out was how to display the used percent.... like i shows the used cpu percent, the used ram percent, the used swap percent... seems obvious that it would be the same,. but it isnt.

i guess i could send it out to a shell command, but thats stupid.

maybe ill try to write a patch for torsmo.c.... will keep posted if it comes through...


killfire
Top
malone
Apprentice
Apprentice
User avatar
Posts: 159
Joined: Thu Feb 19, 2004 2:39 pm
Location: The p-n junction.

  • Quote

Post by malone » Mon Aug 16, 2004 6:52 pm

but what i was trying to figure out was how to display the used percent
Oh, I wasn't reading closely enough this morning. Definitely post back and share if you write some patches!

Cheers
malone
Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

Re: torsmo issues

  • Quote

Post by nightm4re » Mon Aug 16, 2004 7:39 pm

malone wrote: You can use shell apps, just don't set the interval too short:

Code: Select all

${execi time app}
where time is the interval time in seconds.

HTH.
So, I take it then there exists some sort of command line function you can use to check the number of messages on a server? I tried using some funky bash script I found on an IBM article, but it didn't seem to do anything. I'd like something I can just execute and show me I have new mail.

Oh btw, I currently just use Thunderbird for my email, I haven't set up any procmail/fetchmail/mutt or anything like that, although I might at some point. I'm not happy with the way my main email account works, so I might fix it that way.
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 3:07 am

nightmare:

i got something for you.

affinity hacked up a patch, so that torsmo's mail check works on thunderbirds inbox!

you just set the mail path to ~/.thunderbird/*/*/Inbox

he posted the patch here:
http://bugs.gentoo.org/show_bug.cgi?id=60526

that way, it wont waste cpu cycles, and you still can use thunderbird!

the one thing is, you will have to have thunderbird running (because its thunderbird that gets the mail) and you will have to set thunderbirds interval to whatever the interval you want the mailt o be checked.

but i dont think thst such a problem.... because torsmo looks SO much better than gkrellm!

killfire
Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

  • Quote

Post by nightm4re » Tue Aug 17, 2004 3:33 am

killfire wrote:nightmare:

i got something for you.

affinity hacked up a patch, so that torsmo's mail check works on thunderbirds inbox!

you just set the mail path to ~/.thunderbird/*/*/Inbox

he posted the patch here:
http://bugs.gentoo.org/show_bug.cgi?id=60526

..snip..
word! that's awesome! i generally leave a thunderbird instance running on a different virtual desktop, but it is really annoying to check it all th etime. if i just had torsmo on my root window it'd be exactly what i need. thanks for the heads up!
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
miqorz
Veteran
Veteran
User avatar
Posts: 1170
Joined: Sun Apr 04, 2004 7:05 pm
Location: Pissing into the wind.
Contact:
Contact miqorz
Website

  • Quote

Post by miqorz » Tue Aug 17, 2004 6:15 am

What about us who don't want to use that ungodly mess of an app?

Personally I just use pine.
Want a GUI installer? Use fucking knoppix.
OSX themes suck more than you.. Almost.
Daily Screenshot
Top
saebla
n00b
n00b
User avatar
Posts: 48
Joined: Wed May 05, 2004 9:41 pm
Location: Sweden

  • Quote

Post by saebla » Tue Aug 17, 2004 12:10 pm

regarding cpu usage.. if you compare torsmo to gdesklets it really doesn't matter if you have a bunch of scripts running every 30 seconds to check a few things.. (IMO).
gdesklets made my comp slow.. torsmo I hardly notice at all.. karamba was a bit better but still pretty resource intensive.

and regarding e-mail check.
I use the following in my torsmo.. sure it doesn't check how many mails there is but who cares about that anyways..

Code: Select all

VAR_NEWMAIL=`ls $HOME/.maildir/new/`
if [ "$VAR_NEWMAIL" != "" ];
then
echo "You have new mail.."
else
echo "No new mail.."
fi
I don't find this to be hogging any resources.. I run it every 10 seconds.

I use fetchmail + crontab to fetch my mail from pop3 so this is _kind of_ what you were searching for right?..
Where we're going.. we don't need roads..
Top
redshift
Tux's lil' helper
Tux's lil' helper
Posts: 98
Joined: Wed Nov 26, 2003 8:23 pm
Contact:
Contact redshift
Website

  • Quote

Post by redshift » Tue Aug 17, 2004 1:09 pm

saebla wrote: I use the following in my torsmo.. sure it doesn't check how many mails there is but who cares about that anyways..

Code: Select all

VAR_NEWMAIL=`ls $HOME/.maildir/new/`
if [ "$VAR_NEWMAIL" != "" ];
then
echo "You have new mail.."
else
echo "No new mail.."
fi
If you want the number of mails as well, you could always use this simple modified version:

Code: Select all

VAR_NEWMAIL=`ls $HOME/.maildir/new | wc -l`
if [ "$VAR_NEWMAIL" -eq "0" ]; then
  echo "No new email."
else
  echo "You have $VAR_NEWMAIL new emails."
fi
Tom
Top
saebla
n00b
n00b
User avatar
Posts: 48
Joined: Wed May 05, 2004 9:41 pm
Location: Sweden

  • Quote

Post by saebla » Tue Aug 17, 2004 2:10 pm

great! I'll check it out..
Where we're going.. we don't need roads..
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 2:15 pm

miqorz wrote:What about us who don't want to use that ungodly mess of an app?

Personally I just use pine.
i dont know pine, but if it uses standard status headers (look at the headers) as in "R" for read and "U" for unread, then torsmo alreadys supports you !


what the patch was for, is that mozilla (and therefore thunderbird) uses the abnormal "X-Mozilla-Status" headers, with a "0000" meaning unread. which is what i was working on (ok, i was testing, he was writing) a patch for.


if you have your mail spool set up (in the .torsmorc file) then all you need to do is in the formatting is $new_mails or $mails....

[EDIT]

regarding the scripts, i think this would be faster, but i also think it looks better...than a Youve got mail, that seems way to aol to me. :)

and i dont think you can even begin to compare the subtle beauty that is torsmo to the behemouth gdesklets.... ;)

all i have is a:

...................................
mail: 1
....................................

displaying only the new mails.... looks realy nice, and does what i need.

for the record, torsmo checks the mail every 9.5 seconds or so.
[/EDIT]

killfire
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 2:28 pm

malone wrote:
but what i was trying to figure out was how to display the used percent
Oh, I wasn't reading closely enough this morning. Definitely post back and share if you write some patches!

Cheers
i got it working, but :oops: i dont know how to write patches !

what i did, was vim torsmo.c and go to line 1086, and change the existing:

Code: Select all

(int) ((obj->data.fs->avail*100) / obj->data.fs->size));
to this:

Code: Select all

(100 - ((int) ((object->data.fs->avail*100) / obj->data.fs->size))));
this is an ugly hack, because i didnt even change any names, but that makes it more compatible.... also, it works.... woohoo!

[EDIT]
heres a screen shot of it running(notice the disks show the percent used!):
http://www.sover.net/~ljohnstn/torsmo.jpg
and if you want my torsmorc (someone was askign about that a little while ago)
its here:
http://www.sover.net/~ljohnstn/torsmorc
[/EDIT]

if someone can show me how to write patches, then ill post this as a patch...somewhere :)

killfire[/url]
Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

  • Quote

Post by nightm4re » Tue Aug 17, 2004 2:57 pm

killfire wrote: i got it working, but :oops: i dont know how to write patches !

what i did, was vim torsmo.c and go to line 1086, and change the existing:

Code: Select all

(int) ((obj->data.fs->avail*100) / obj->data.fs->size));
to this:

Code: Select all

(100 - ((int) ((object->data.fs->avail*100) / obj->data.fs->size))));
just to be clear, that is a typo there, correct? object-> should be obj->

I haven't written a patch, but I know you use the diff tool to do it. I think you need to specify some switches that i don't know about though.

Code: Select all

# diff -switches oldfile newfile >patch.file
something like that.

you also should consider making the free vs used thing a setting in torsmorc. I'll look into doing that if you want, that'd be neat i think. Then, you could just toggle which one you wanted.
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 3:50 pm

sorry, your right, it was a type :oops:

i went through the code, and i changed it over, so that now, instead of using "fs_free_perc" you can use "fs_used_perc"

here are the changes if you want:
LINE, OLD, NEW:

Code: Select all

444: "OBJ_fs_free_perc,"       to ->     "OBJ_fs_used_perc,"

Code: Select all

668:  "OBJ(fs_free_perc)"    to ->    "OBJ(fs_used_perc)"

Code: Select all

1090:  "OBJ(fs_free_perc) {"     to ->   "OBJ(fs_used_perc)   {"

Code: Select all

1094:  "(int) (obj->data.fs->avail*100) / obj->data.fs->size));   to->   (100 - ((int) ((obj->data.fs->avail*100 / obj->data.fs->size))));
this doesnt make two options, but what it does do is make thigns more clear, because with it, you can put "fs_used_perc" in your .torsmorc file.

i will look into patch syntax, and maybe will post a patch.

would not be worth an official patch until we have the two options down, which i will also look into :)

killfire

(edited because i messed up , twice)
Last edited by killfire on Tue Aug 17, 2004 4:44 pm, edited 1 time in total.
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 4:43 pm

i got a patch!

heres what it will do:
make it so you can use "fs_used_perc" and get the used percent

its the individual patch, no mozilla support, but i am including a separate patch for both

here it is:
http://www.sover.net/~ljohnstn/torsmo-0 ... perc.patch
for both:
http://www.sover.net/~ljohnstn/torsmo-0 ... illa.patch

[EDIT]
ive had some trouble when using the combined patch, not sure what goes wrong, but it seems to break the mail check. maybe its just something weird with my setup, but it works fine to apply the two patches separately.
[/EDIT]

also, why not, here it is:

Code: Select all

--- torsmo.c	2004-08-17 11:29:03.856197376 -0400
+++ torsmo_new.c	2004-08-17 11:31:37.763799864 -0400
@@ -433,7 +433,7 @@
   OBJ_execi,
   OBJ_fs_bar,
   OBJ_fs_free,
-  OBJ_fs_free_perc,
+  OBJ_fs_used_perc,
   OBJ_fs_size,
   OBJ_fs_used,
   OBJ_hr,
@@ -657,7 +657,7 @@
     if (!arg) arg = "/";
     obj->data.fs = prepare_fs_stat(arg);
   END
-  OBJ(fs_free_perc)
+  OBJ(fs_used_perc)
     if (!arg) arg = "/";
     obj->data.fs = prepare_fs_stat(arg);
   END
@@ -1079,11 +1079,11 @@
       if (obj->data.fs != NULL)
         human_readable(obj->data.fs->avail, p);
     }
-    OBJ(fs_free_perc) {
+    OBJ(fs_used_perc) {
       if (obj->data.fs != NULL) {
         if (obj->data.fs->size)
           snprintf(p, n, "%d",
-              (int) ((obj->data.fs->avail*100) / obj->data.fs->size));
+              (100-((int) ((obj->data.fs->avail*100) / obj->data.fs->size))));
         else
           snprintf(p, n, "0");
       }

Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

  • Quote

Post by nightm4re » Tue Aug 17, 2004 5:19 pm

two things...

#1, the patch fails becuase you've altered lines in the original file, so trying to put the mozilla patch on your altered code might mess it up. Especially if you have added lines of code, cuz then the line numbers will be messed up. The way to do it is to do the mozilla patch first, then edit that afterwards to put your stuff on it. I'm not sure if that's what you did by the two links there, you should do your edits on the clean copy and make a patch, and the mozilla patched and make a patch.

#2, i think it would make a lot more sense if instead of replacing one thing, why don't you just put another display option in there? make it be able to read fs_used_perc. i see there already exists a fs_used, just no fs_used_perc.

I'll look into it, I'm bored right now. :D
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

  • Quote

Post by nightm4re » Tue Aug 17, 2004 5:40 pm

okay, i added it! now you can use another variable, fs_used_perc, in your .torsmorc file. works great so far. only thing I see is, i want to mod the fs_bar so that it can draw it as a pct, haven't looked into it.

EDIT: removed for the patch on page 2.

i'd work on it more right now, but i gotta go get my wisdom teeth examined to be removed. just a consulatation right now, but man i don't wanna do that... i'l work on this later today.
Last edited by nightm4re on Tue Aug 17, 2004 8:22 pm, edited 1 time in total.
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 6:36 pm

i started adding things, but i must have made a typo :(
because what i came up with was the upper and lower bounds of ints... as my percents woops....

so i thought i could be more gauranteed to get it working immediately by switching them.

but nice job, am checking the file out now.

i think with my patch, i applied the wrong one (when affinity started poping up patches, the first ones did not work) and then edited that file, and thats what i created the patch with. i think.

but its much easier to just patch it twice. it works for me to do the mozilla patch first, and then the torsmo one. it says the lines are off, but it handles it fine.

you make a patch like this:

Code: Select all

diff -u oldfile.c newfile.c >patch.patch
its your patch, so you should submit it. maybe to portage, to add functionality, but maybe to torsmo itself.

[EDIT]
got the patch right here:
http://www.sover.net/~ljohnstn/add_fs_used.patch

using it right now, its brilliant!

not that i use it, but its much better to have the options....

[/EDIT]


killfire
Top
tarzan420
Tux's lil' helper
Tux's lil' helper
Posts: 81
Joined: Sat Jul 05, 2003 10:46 pm
Location: Fairbanks AK

  • Quote

Post by tarzan420 » Tue Aug 17, 2004 7:35 pm

well, since this seems to be the place for talking torsmo development...

i've got the beginnings of Xft support in torsmo!
screenie!

If you look at the screenshot, you can see that it still needs some work... Most of the stuff is hard-coded in there.

I don't plan on releasing a patch right now, but if you really want to work on my shi**y code, send me a pm and I can hook you up.
The power of Unix coupled with a pleasing interface and scores of usable desktop applications is a disgusting perversion of everything Unix stands for.
Top
nightm4re
Guru
Guru
User avatar
Posts: 519
Joined: Sun Jun 20, 2004 3:28 am
Location: Providence, RI, USA
Contact:
Contact nightm4re
Website

  • Quote

Post by nightm4re » Tue Aug 17, 2004 7:40 pm

tarzan420 wrote:well, since this seems to be the place for talking torsmo development...

i've got the beginnings of Xft support in torsmo!
screenie!

If you look at the screenshot, you can see that it still needs some work... Most of the stuff is hard-coded in there.

I don't plan on releasing a patch right now, but if you really want to work on my shi**y code, send me a pm and I can hook you up.
sweet, cool to see we aren't the only ones doing stuff for it! i might take you up on that code soon after i figure out my thing.. not much more to do tho! keep it up!
Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net
Top
killfire
l33t
l33t
User avatar
Posts: 618
Joined: Sat Oct 04, 2003 11:48 pm
Contact:
Contact killfire
Website

  • Quote

Post by killfire » Tue Aug 17, 2004 7:46 pm

tarzan420 wrote:well, since this seems to be the place for talking torsmo development...

i've got the beginnings of Xft support in torsmo!
screenie!

If you look at the screenshot, you can see that it still needs some work... Most of the stuff is hard-coded in there.

I don't plan on releasing a patch right now, but if you really want to work on my shi**y code, send me a pm and I can hook you up.
id like to take a look at what your doing, it looks really nice!

even if you dont think its worthy of a patch, can you give me the output off diff?

just so i can see what you changing and take a look at torsmo.c with your changes... its simpler than posting the whole torsmo.c :)

by the way, what font is that? it looks really nice!

killfire
Top
Post Reply

332 posts
  • Page 1 of 14
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 14
  • Next

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic