det@hawkmoon.MN.ORG (Derek E. Terveer) (02/12/91)
I am looking for a program that would allow me to set the curses environment variables LINES and COLUMNS to the current window's dimensions, but i don't want to have to write something that already exists. (Besides the fact that i have never written an X program before, and i don't really have the time to delve into it right now) Right now, for non-standard window sizes, i simply manually type the following for each window after it has come up (for example): export LINES=15 COLUMNS=117 I would rather stick something like the following into my .kshrc so that it automatically gets done for me at window creation time: export LINES=$(resize -l) COLUMNS=$(resize -c) -l for lines, -c for columns, or something like that. It would obviously be a very simple program (?) for someone who knows X (it would be nice to have it done in c++ too!), and it would be a good, simple study piece for a person starting to learn X. Anybody have the source code for such a program??? derek -- Derek "Tigger" Terveer det@hawkmoon.MN.ORG -- U of MN Women's Lax I am the way and the truth and the light, I know all the answers; don't need your advice. -- "I am the way and the truth and the light" -- The Legendary Pink Dots
gildea@expo.lcs.mit.EDU (Stephen Gildea) (02/27/91)
Date: 12 Feb 91 07:26:00 GMT From: det@hawkmoon.mn.org (Derek E. Terveer) Subject: resize program I am looking for a program that would allow me to set the curses environment variables LINES and COLUMNS to the current window's dimensions, but i don't want to have to write something that already exists. It does already exist. See the "resize" program in the xterm source directory of the MIT R4 distribution. Running resize in your xterm outputs something like COLUMNS=117; LINES=15; export COLUMNS LINES; < Stephen MIT X Consortium