In a previous post, I walked through making a .bat file that helped set up a truly portable Cygwin install. At the end of that post, I mentioned that you can add these lines to the top of the .bat file to specify a starting size for the command window that Windows opens:
REM Set screen dimensions.
mode con: cols=120 lines=40
The issue with this is that if you have a portable install, then you might run from different machines that have very different screen resolutions, so it would be difficult to specify a default number of rows and columns that would work for all situations.
Instead, lets set it up to always run fullscreen!
To do this, I am going to use “mintty” which is a tty console, and is a Windows application. First, install mintty by running the normal Cygwin installer, and choosing mintty from the installable packages. This will make a “mintty.exe” in your cygwin \bin directory.
Next, lets make a new .bat file. I named mine “Run Mintty.bat” and placed it int he root folder of my portable / USB Cygwin drive. I should also mention that I have Cygwin itself installed in the “/cygwin” folder on my drive. If you ahev it installe somewhere else, then you can adjust your paths as needed. From my previous post, mentioned above, I also have a .bat file named “Run Cygwin.bat” that I can run to start Cygwin and map to a specified user, which helps make it truly portable. This isn’t necessary, but I will mention it here anyway.
Now, in our “Run Mintty.bat” file, simple put this line:
start /max cygwin\bin\mintty.exe -w max -t "Mintty Cygwin" -e "./cygwin/bin/bash --login -i"
start” keyword just tells Windows to start an application. The .bat file itself will continue and exit, leaving the specified command running.
/max” tells Windows to run this application maximized.
cygwin\bin\mintty.exe -w max” s the command we want Windows to execute.
-e ./"cygwin/Run Cygwin.bat"” specifies the command that we want mintty.exe to run on startup.
If you had created a “Run Cygwin.bat” from my previous post about making Cygwin more portable, then you would instead specify “
-e ./"cygwin/Run Cygwin.bat"“.
Now to start Cygwin fullscreen, just execute this .bat file.