usekillfire wrote:i would like it to display the percentage of used disk space, instead of free
Code: Select all
${fs_used /}Code: Select all
${execi time app}
/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?
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.malone wrote:usekillfire wrote:i would like it to display the percentage of used disk space, instead of freeYou can use shell apps, just don't set the interval too short:Code: Select all
${fs_used /}where time is the interval time in seconds.Code: Select all
${execi time app}
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.malone wrote: You can use shell apps, just don't set the interval too short:where time is the interval time in seconds.Code: Select all
${execi time app}
HTH.
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!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..
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: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
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."
fii 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 !miqorz wrote:What about us who don't want to use that ungodly mess of an app?
Personally I just use pine.
i got it working, butmalone wrote:Oh, I wasn't reading closely enough this morning. Definitely post back and share if you write some patches!but what i was trying to figure out was how to display the used percent
Cheers
Code: Select all
(int) ((obj->data.fs->avail*100) / obj->data.fs->size));
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->killfire wrote: i got it working, buti dont know how to write patches !
what i did, was vim torsmo.c and go to line 1086, and change the existing:to this:Code: Select all
(int) ((obj->data.fs->avail*100) / obj->data.fs->size));Code: Select all
(100 - ((int) ((object->data.fs->avail*100) / obj->data.fs->size))));
Code: Select all
# diff -switches oldfile newfile >patch.file
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))));
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");
}
Code: Select all
diff -u oldfile.c newfile.c >patch.patch
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!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!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.