Main index > About dead desklets > torsmotoy

By syfou (Core Developer & Desklet Author), on Thu Mar 24 05:30:59 2005: torsmotoy.

torsmotoy desklet issues are discussed here.

By CitizenX (Themer / Graphic Artist), on Thu Mar 24 14:35:12 2005.

I'm getting color discrepancies...for instance I use ${color orange} in one of my torsmos and torsmotoy renders it as red.

I'm also unable to run $exec with multiple commands. For instance, I use

Code:


${exec ps gaxo %cpu,%mem,comm,user|sort +0nr|head -n 5}


and I get:

Code:

Traceback (most recent call last):
  File "./torsmotoy.py", line 822, in ?
    Events(dirname(__file__)).pause()
  File "./torsmotoy.py", line 766, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 159, in __init__
    self._alarm()
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 296, in _alarm
    timeout=self.alarm()
  File "./torsmotoy.py", line 815, in alarm
    self.dpy.refresh()
  File "./torsmotoy.py", line 320, in refresh
    self.widgets = [ elem.widget() for elem in self]
  File "./torsmotoy.py", line 424, in widget
    result=self.__class__.__dict__['_'+ str(self.var[0])](self)
  File "./torsmotoy.py", line 493, in _exec
    return TorsmoString(popen(' '.join(self.var[1:])).read().strip(),None)
TypeError: sequence item 4: expected string, int found



I've tried it with different permutations of the ps command, and it seems that it only comes up when I try to pass ps through to another command. ${exec ps} works just fine, along with any other single command.

By syfou (Core Developer & Desklet Author), on Thu Mar 24 15:14:29 2005.

CitizenX wrote:


I'm also unable to run $exec with multiple commands


It is not multiple commands that are at stake here, it's me failing to include boundary control for type conversion... Around line 493, it reads:

Code:


def _exec(self):
        return TorsmoString(popen(' '.join(self.var[1:])).read().strip(),None)


When it should be:

Code:


def _exec(self):
        return TorsmoString(
            popen(' '.join([str(v) for v in self.var[1:]])).read(),None)



As for the color problem, orange is, well, quite redish by X window definition.

Code:


red, green, blue = (255,69,0)


It occurs that X Window does perform some "automated color correction" due to limited colormaps sometimes... So you might want to try orange1 instead, as it is probably the real color you are seeking; there is not much I can do about it. I will package version 0.0.2 right away.

[EDIT]
torsmotoy 0.0.2 is now available.

By MrGreen (User), on Sat Apr 2 04:46:03 2005.

Can I use xft fonts in torsmotoy ?? .. my old .torsmorc works but not fonts

Thanks in Advance for a flicker free future .. lol

By syfou (Core Developer & Desklet Author), on Sat Apr 2 14:17:15 2005.

MrGreen wrote:

Can I use xft fonts in torsmotoy ?? .. my old .torsmorc works but not fonts


In the README, I wrote:


Most global options are ignored, since they do not have meaning within adesklets. Options that are supported are:

  • color management options: default_color, default_shade_colors, draw_shades, but not default_ouline_color
  • border management options: draw_borders, stipples_borders, border_margin, border_width
  • mail spool settings: mail_spool
  • display update settings: update_interval



Well, adesklets is based on Imlib2, and Imlib2 only understand true-type fonts... Right now, I did not put any configuration effort on fonts, and VeraMono usage is hardcoded at line 777 of torsmotoy... You can of course manually change it there; it's also quite trivial to make it a global option in config.txt...

By MrGreen (User), on Sat Apr 2 14:22:04 2005.

Ok ... :oops: that told me...Thanks for your help...

Just changed 777 fonts are sweet now ... (still think an option in config.txt would be nice ;-))

emm I hate those stippled lines lol........

MrGreen

By woverin (User), on Tue Apr 19 14:00:13 2005.

$battery
$downspeed, $downspeedf, $upspeed, $upspeedf
doesn't seem to work with my ibm T30

ACPI is enable in kernel
cat /proc/acpi/battery/BAT0/state works fine.

I also specified
${battery BAT0}
${downspeed eth0}

but no luck

By syfou (Core Developer & Desklet Author), on Tue Apr 19 14:08:07 2005.

In the README, I wrote:


Most variables are supported and kept their original behavior. For complete
portability across Unix, a few variables were dropped:

  • acpi related variables
  • seti related variables (could probably be done, but I did not have what
    was needed to test it).
  • battery

By TimSchutte (Fearless Moderator), on Wed Apr 27 23:50:50 2005: Torsmotoy install difficulties.

Hi All,

I downloaded torsmotoy-0.2.0, and I am having some problems getting it to work.

When I run it I get the following message:

tim@dojo torsmotoy-0.0.2 $ ./torsmotoy.py
Traceback (most recent call last):
File "./torsmotoy.py", line 16, in ?
import statgrab
ImportError: No module named statgrab

I have installed the libstatgrab package via urpmi, and I downloaded pystatgrab-0.3, but when I tried to install it, I get the following:

./setup.py install
Error, libstatgrab is not installed (according to pkg-config).

But here:

root@dojo pystatgrab-0.3 # locate libstatgrab
/usr/share/doc/libstatgrab5-0.11.1
/usr/share/doc/libstatgrab5-0.11.1/ChangeLog
/usr/share/doc/libstatgrab5-0.11.1/AUTHORS
/usr/share/doc/libstatgrab5-0.11.1/INSTALL
/usr/share/doc/libstatgrab5-0.11.1/NEWS
/usr/share/doc/libstatgrab5-0.11.1/README
/usr/lib/libstatgrab.so.5
/usr/lib/libstatgrab.so.5.1.2

What the heck am I doing wrong???

Thanks,
Tim

By syfou (Core Developer & Desklet Author), on Thu Apr 28 00:04:00 2005.

Hi Tim,

Tim Schutte wrote:


I downloaded torsmotoy-0.2.0, and I am having some problems getting it to work.

When I run it I get the following message:
[...]
ImportError: No module named statgrab

From the rest of your message (you already know it, I guess), you absolutely need pystatgrab, as stated in torsmotoy's README.

Tim Schutte wrote:


I have installed the libstatgrab package via urpmi, and I downloaded pystatgrab-0.3, but when I tried to install it, I get the following:

Code:


./setup.py install
Error, libstatgrab is not installed (according to pkg-config).


[...] What the heck am I doing wrong???

Probably nothing... I would bet your urpmi package removed or misplaced the pkg-config description (the .pc file)... So Just try downloading and installing libstatgrab by hand from source (do not forget the --prefix=/usr argument at configuration time)... Let me know if it didn't work.

By TimSchutte (Fearless Moderator), on Thu Apr 28 10:58:28 2005.

Hi Sylvain,

Thanks, will do!

Tim

By TimSchutte (Fearless Moderator), on Fri Apr 29 09:53:20 2005: Torsmotoy Installed, now. . ..

Hi Sylvain,

TimSchutte wrote:

Hi Sylvain,

Thanks, will do!

Tim


And I did. Now it is installed, but when I run it I get this:

Quote:

tim@dojo torsmotoy-0.0.2 $ Traceback (most recent call last):
File "./torsmotoy.py", line 823, in ?
Events(dirname(__file__)).pause()
File "./torsmotoy.py", line 767, in __init__
adesklets.Events_handler.__init__(self)
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 159, in __init__
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 296, in _alarm
File "./torsmotoy.py", line 816, in alarm
self.dpy.refresh()
File "./torsmotoy.py", line 320, in refresh
self.widgets = [ elem.widget() for elem in self]
File "./torsmotoy.py", line 424, in widget
result=self.__class__.__dict__['_'+ str(self.var[0])](self)
File "./torsmotoy.py", line 565, in _mails
lambda fd:fd))])
File "./torsmotoy.py", line 449, in _mbox_iter
r = mbox.next()
File "/usr/lib/python2.3/mailbox.py", line 24, in next
self.fp.seek(self.seekp)
AttributeError: 'str' object has no attribute 'seek'

[1]+ Exit 1 ./torsmotoy.py


The original torsmo does work, after I installed ~/..torsmorc

Any suggestions?

Thanks,
Tim
:oops:

By syfou (Core Developer & Desklet Author), on Fri Apr 29 13:39:57 2005.

Tim,

I must say the mailer capability were largely untested on python 2.3, so it is possible I made some portability mistakes... Would you care sharing your torsmorc with me, either here or by email?

By TimSchutte (Fearless Moderator), on Fri Apr 29 16:02:07 2005.

syfou wrote:

I must say the mailer capability were largely untested on python 2.3, so it is possible I made some portability mistakes... Would you care sharing your torsmorc with me, either here or by email?
I'll send it via email.

Thanks!
Tim

By justmehere (User), on Fri Apr 29 19:27:38 2005.

Just got this with a new version of torsmotoy:
File "./torsmotoy.py", line 658, in _time
return TormoString(time.strftime(fmt))
NameError: global name 'TormoString' is not defined

The line should actually read "TorsmoString"....I changed it and it works now.

By syfou (Core Developer & Desklet Author), on Fri Apr 29 20:00:53 2005.

Thanks for the fix... I will incorporate it.

By lyeinyoureye (User), on Wed May 4 21:28:32 2005, last edited on Wed May 4 21:56:42 2005.

I'm quite the newb, and I've managed to get this

Code:

Traceback (most recent call last):
  File "/home/hdb2/desklets/torsmotoy-0.0.2/torsmotoy.py", line 823, in ?
    Events(dirname(__file__)).pause()
  File "/home/hdb2/desklets/torsmotoy-0.0.2/torsmotoy.py", line 767, in __init__    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "/home/hdb2/desklets/torsmotoy-0.0.2/torsmotoy.py", line 771, in ready
    join(self.basedir,'config.txt'))
  File "/home/hdb2/desklets/torsmotoy-0.0.2/torsmotoy.py", line 728, in __init__    vars, self.desc = re.split('\nTEXT',map[:])
ValueError: unpack list of wrong size



~/.torsmorc

Code:

default_color black
default_shade_color white
default_outline_color black
alignment top_right 
font 8x13

Just the generic config so far as I know.

Also, I did needed to do this

Quote:

Just open /usr/include/linux/ethtool.h file and add #include <linux/types.h> before the struct declaration.

so that libstatgrab would compile.

By syfou (Core Developer & Desklet Author), on Wed May 4 21:39:09 2005.

Just add some content (a TEXT marquer, then some markup)... In a pure pythonic way, there is no boundary control for degenerated or corner-case .torsmorc (There is no formal grammar anyway)... You can just start up with torsmorc.sample provided with torsmotoy 0.0.2. Please not also there is currently an issue in some Python environment with the handling of mail-related variables... I should have a look at it in the upcoming week. Regards,

By lyeinyoureye (User), on Wed May 4 22:09:18 2005.

I see...
well, not explicitly. But I got the gist.
Thanks for all the help. :D

By Noobuntu (User), on Tue Jun 28 10:15:37 2005.

Hi, I get the following message when i try to run torsmotoy:

Code:


Traceback (most recent call last):
  File "./torsmotoy.py", line 823, in ?
    Events(dirname(__file__)).pause()
  File "./torsmotoy.py", line 767, in __init__
    adesklets.Events_handler.__init__(self)
  File "localstore/theorie/arrizaba/lib/python2.3/site-packages/adesklets/events_handler.py", line 157, in __init__
  File "./torsmotoy.py", line 771, in ready
    join(self.basedir,'config.txt'))
  File "./torsmotoy.py", line 728, in __init__
    vars, self.desc = re.split('\nTEXT',map[:])
ValueError: unpack list of wrong size



Any idea how to proceed (i am not root in my machine, so that makes it a bit more difficult)? Is it due to python2.3?

By syfou (Core Developer & Desklet Author), on Tue Jun 28 17:41:13 2005.

Noobuntu wrote:


Any idea how to proceed (i am not root in my machine, so that makes it a bit more difficult)? Is it due to python2.3?

I would need to see your $HOME/.torsmorc... Normally, this torsmotoy should run fine on Python 2.3.x.

By fp2099 (User), on Mon Feb 20 16:51:52 2006: No net status.

Torsmotoy doesn't display net stats.

http://static.flickr.com/36/102263753_c1a937c073_o.png

Code:


statgrab -M net.eth0.
net.eth0.collisions = 0
net.eth0.duplex = unknown
net.eth0.ierrors = 0
net.eth0.interface_name = eth0
net.eth0.ipackets = 280227
net.eth0.oerrors = 0
net.eth0.opackets = 322818
net.eth0.rx = 75
net.eth0.speed = 0
net.eth0.systime = 1140466437
net.eth0.tx = 220
net.eth0.up = true



.torsmorc

Code:

interface_name eth0



If you are wondering.:

Code:

statgrab -s net.eth0.tx
net.eth0.tx = 243917486

net.eth0.tx = 6560

net.eth0.tx = 8989

net.eth0.tx = 14355

net.eth0.tx = 10693

By syfou (Core Developer & Desklet Author), on Mon Feb 20 17:58:49 2006.

The fact that you get the TX and RX fields out of statgrab does not always mean the rates will be computed right. Related code in torsmotory.py is in _downspeedf() and _upspeedf()... Just try:

Code:


import statgrab
from time import sleep
while True:
    print statgrab.sg_get_network_iface_stats()
    sleep(1)


Most likely, the speed item won't budge from zero, no matter what... I recall having seen this from time to time on a few platforms... I encourage you to report such problems to the statgrab/pystatgrab authors. Yours,

__________________
Sylvain

P.-S. Your desktop is very nice, by the way... Please tell me -- what did you use for the curves of scalable icons?

By Castral (User), on Thu Apr 20 02:36:14 2006.

I get this error trying to register torsmotory.py:

Code:

Traceback (most recent call last):
  File "torsmotoy.py", line 823, in ?
    Events(dirname(__file__)).pause()
  File "torsmotoy.py", line 767, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "torsmotoy.py", line 771, in ready
    join(self.basedir,'config.txt'))
  File "torsmotoy.py", line 724, in __init__
    map = mmap.mmap(fd.fileno(),size,access=mmap.PROT_READ)
EnvironmentError: [Errno 22] Invalid argument



In case it matters, I haven't altered config.txt in any way.

Any help would be appreciated.

By syfou (Core Developer & Desklet Author), on Thu Apr 20 13:48:58 2006.

Hi Castral,

you only get this with torsmotoy? What about weather, for instance?

By kamran_pro (User), on Sat Sep 30 15:36:00 2006: Re: Torsmotoy Installed, now. . ..

TimSchutte wrote:

Hi Sylvain,

TimSchutte wrote:

Hi Sylvain,

Thanks, will do!

Tim


And I did. Now it is installed, but when I run it I get this:

Quote:

tim@dojo torsmotoy-0.0.2 $ Traceback (most recent call last):
File "./torsmotoy.py", line 823, in ?
Events(dirname(__file__)).pause()
File "./torsmotoy.py", line 767, in __init__
adesklets.Events_handler.__init__(self)
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 159, in __init__
File "usr/lib/python2.3/site-packages/adesklets/events_handler.py", line 296, in _alarm
File "./torsmotoy.py", line 816, in alarm
self.dpy.refresh()
File "./torsmotoy.py", line 320, in refresh
self.widgets = [ elem.widget() for elem in self]
File "./torsmotoy.py", line 424, in widget
result=self.__class__.__dict__['_'+ str(self.var[0])](self)
File "./torsmotoy.py", line 565, in _mails
lambda fd:fd))])
File "./torsmotoy.py", line 449, in _mbox_iter
r = mbox.next()
File "/usr/lib/python2.3/mailbox.py", line 24, in next
self.fp.seek(self.seekp)
AttributeError: 'str' object has no attribute 'seek'

[1]+ Exit 1 ./torsmotoy.py


The original torsmo does work, after I installed ~/..torsmorc

Any suggestions?

Thanks,
Tim
:oops:


I'm having the exact same problem. Have we found a solution for this yet?

P. S. I'm using Python 2.5 but I tried testing with 2.4's mailbox.py and got the same error there.

By Heril (User), on Sat Oct 7 23:22:18 2006.

I'm trying to run this desklet, but this error is generated

Code:

Traceback (most recent call last):
  File "./torsmotoy.py", line 823, in ?
    Events(dirname(__file__)).pause()
  File "./torsmotoy.py", line 767, in __init__
    adesklets.Events_handler.__init__(self)
  File "/usr/lib/python2.4/site-packages/adesklets/events_handler.py", line 157, in __init__
    self.ready()
  File "./torsmotoy.py", line 771, in ready
    join(self.basedir,'config.txt'))
  File "./torsmotoy.py", line 724, in __init__
    map = mmap.mmap(fd.fileno(),size,access=mmap.PROT_READ)
EnvironmentError: [Errno 22] Invalid argument


the .torsmorc file is currently empty.

By raul_ (User), on Sun Oct 15 14:29:16 2006.

Still no fix?


adesklets is proud to be hosted on:

SourceForge.net Logo

Back to adesklets.sf.net.