On Sun, May 20, 2007 at 05:12:30PM +0200, Radovan Garabik wrote: > I started to implement the idea from resize.c, but then I stumbled upon > a simpler way of finding terminal width, and implemented that (I hope it > is sufficiently generic), with resize(1) as a fallback.
Aha, reading TIOCGWINSZ from termios, makes sense. I didn't pay much attention to which paramater is being fetched when I was extracting getcols.c, I see now that it does the whole shebang with termio, TCGETA + TCSETAW. Seems excessive even for the original program... > > The problems remain. Firstly, the end is at the 82nd character, which is > > twelve characters short of the actual number of columns. Secondly, > > The first column in the pydf output expanded the most; the illustration > > (sixth column) expanded too, but way too little compared to the amount of > > empty space remaining. > > 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). Now if there only was a way to set this in an environment variable, so that I can propagate it to all my machines through my .zshrc rather than a separate .pydfrc... :) -- 2. That which causes joy or happiness. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]