Search code examples
windowscygwin

In Windows, how can I launch cygwin shells n times and then resize their windows?


My hope is to one-click a shortcut, and get a grid of cygwin shells laid out before me, filling up my whole screen.

Any idea where I should start looking?


Solution

  • rxvt has a geometry option:

    rxvt --geometry 100x10+500+200

    gives you a rxvt window 100 columns wide, 10 rows tall, at (upper-left) pixel location 500x, 200y.

    To invoke from a batch file so that in the background (like "&" on unix), use start:

    start C:\cygwin\bin\rxvt

    To fill a 2560x1600 monitor with a grid of 4 cygwin rxvt windows, you'd make a batch file like this:

    start C:\cygwin\bin\rxvt --geometry 179x65+0+0 -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr -e /usr/bin/bash --login -i
    start C:\cygwin\bin\rxvt --geometry 179x65+1280+0 -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr -e /usr/bin/bash --login -i
    start C:\cygwin\bin\rxvt --geometry 179x65+0+800 -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr -e /usr/bin/bash --login -i
    start C:\cygwin\bin\rxvt --geometry 179x65+1280+800 -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr -e /usr/bin/bash --login -i

    If you aren't already using rxvt, I highly recommend it (or any other terminal that is better than a DOS box).