📜 ⬆️ ⬇️

rCons - quake-style console wrapper for Windows

At one time, when I got acquainted with Linux, I was intrigued by the possibility of calling the console in the form in which it was made in numerous games. Examples of such programs include Guake and Yakuake . There were no sane options for Windows, so after a while I matured to write my own version.



Remembering that I was not a programmer, but only an ordinary admin, I realized that I wouldn’t be able to write a terminal completely from scratch. Therefore, the logical solution was to use what is - cmd.exe and the native shell from PS.
At first I tried to embed the native shell window into my own, cutting off the boarders and the header, but suddenly it turned out that the terminal emulator behaves not at all like a regular window and when cutting the header (WS_CAPTION) using SetWindowLong (), strange glitches with drawing start . Of the other “bonuses” - WS_VSCROLL is permanently set and not removed, and the size of the window itself cannot be changed pixel-by-pixel, only taking into account the width of the screen buffer and font size.

It became clear that the terminal window would have to be left alone. Then I just decided to move it left-up so that the title and border were not visible, and on the right to cover the border and scroll with another empty window.
')
Total, the logic turned out like this:

Despite the frank crutches, such a scheme worked quite adequately on everything, starting with Windows XP.

Known bugs:

Download: setup , portable , google
Tested on Windows XP / Vista / 7/8, cmd, bash and powershell were tested as terminal emulators.

UPD: To specify the font and width of the workspace, you need to run cmd.exe separately, right-click on the header and configure defaults. Alternatively, as suggested by zzeneg .
Default hotkey for console call - Ctrl-TAB

UPD2: I will consider all wishes and will try to implement it in the next big update, after the new year. Well, you know;)

UPD3: New version:

I will deal with features in the following big update, in short the list is as follows:
1. The ability to set the size of the window horizontally.
2. Support mintty ( manual )
3. Ability to specify a hot key without a modifier.

I think for now. Thank you all for the feedback and the upcoming! :)

Source: https://habr.com/ru/post/164249/


All Articles