On Sun, May 27, 2007 at 11:10:40PM +0200, Josip Rodin wrote: > On Fri, May 25, 2007 at 10:45:43PM +0200, Josip Rodin wrote: > > > Yes, I am aware of the issue, this is due to somewhat inefficient width > > > calculation (and default configuration suited to my previous small > > > monitor :-)), see 'format' in /etc/pydfrc. > > > I have plans to re-design the formatting routines, therefore I have not > > > closed the bug yet. > > > > Regarding format in pydfrc, that data structure is a completely > > non-intuitive thing to use in a configuration file. But now that I see that, > > it's obvious how to improve it - make the default for 'bar' be something > > other than 0.1% of screen size?! :) > > > > With a standard 80 column screen, I see good results with 20.0 (percent). > > Erm. Maybe that's not percent. What I didn't notice was this: > > /usr/lib/python2.4/string.py:431: DeprecationWarning: integer argument > expected, got float > return s.ljust(width, *args) > > What went wrong there?
If you want it to be a ratio, not an absolute size, the number has to be less than 1 (i.e. 0.2 == 20%). If it is greater than 1, it is taken as an absolute size, and as such expected to be an integer. So what you specified is the bar size to be exactly 20 characters. Anyway, I rewrote the formatting code (it took me a while, because I am somewhat busy at my work now), and I will upload the new package as soon as I manage to get to ftp-master (currently has some connection problems, it seems). In the meantime, you can get the package from http://kassiopeia.juls.savba.sk/~garabik/software/pydf/ Now the sizes in the configuration file are just lower size limits - if possible, the columns will stretch dynamically to accommodate the contents. I agree about the intuitiveness of the configuration file, I'll try to think about a better way. -- ----------------------------------------------------------- | Radovan GarabĂk http://kassiopeia.juls.savba.sk/~garabik/ | | __..--^^^--..__ garabik @ kassiopeia.juls.savba.sk | ----------------------------------------------------------- Antivirus alert: file .signature infected by signature virus. Hi! I'm a signature virus! Copy me into your signature file to help me spread!