Is it possible to programmatically, or otherwise, increase the width of the Windows console window? Or do I need to create a wrapper program that looks and acts like the console somehow? Are there any programs around that do this already? I use Cygwin extensively in my development, and it seems a little ridiculous to me that all console windows in Windows are width limited.
If it matters at all, I'm running Windows XP.
There is a window's api function to set the width. Here's a tut on it. http://www.adrianxw.dk/SoftwareSite/Consoles/Consoles6.html
Click on the icon on the top left of the console frame (the one that looks like "C:\"), then select Properties . This lets you customize all kinds of stuff. The "layout" tab has the width of the window.
This is a bad solution because it disables vertical scrolling.
This is better:
Hey have you guys here ever thought of the possibility of launching and running Cygwin from within the windows command prompt/console? This is what I always do. Then you can do anything you want to the look of the console to make it sexy.
trying to get su from within cygwin can be difficult at times, especially when you are attempting to do some heavy crunching with the tools provided. People have tried all sorts of things from sudo SU for windows to what ever...when it can be as simple as passing on the administrator credentials from you the "user" (if you are the admin?) even without weird UAC pop ups. You can do this via a simple batch script. Have a below this of a screen grab of what my Cygwin looks like and this is running from a portable version of Cygwin too! No registry entries and any of that rubbish!
The batch file passes the credentials to bash and then bash changes directory (notice the double quotes are needed to pass this variable to the Cygwin colsole in order for it to work)
Note: the brackets like so { } in the above example are NOT included in the batch script. also note that windows CMD window is passing off the string to cygwin to interpret as multiple conditions; cygwin doesn't read the quotes them selves but whats between them. the && is saying change directories and when you do execute the script ./execution-file-here when you get there.
It's a double whammy you can launch a Cygwin or linux like application from within a MS-Windows window and not even type a letter of code or open a console or anything.
I keep this batch file inside of the /Cygwin/bin directory and create a Windows shortcut link on the desktop. Within the shortcut I can stylise the cmd shell window. Even go as far as transparency ;-)
You can increase it manually by right-clicking the tray icon and entering the options dialog.
There are also third-party terminal emulators for Windows, such as Console:
Screenshot of Console http://i37.tinypic.com/2ueu1ag.jpg
Simply run "mode cols,lines" to change the size of the current console window:
mode 120,60
will resize the console window to 120 columns and 60 lines