Saturday, 5 July 2014

Color Command Prompt [C:] Terminal #:

A customized color command prompt :
Windows command prompt unlike linux bash terminal does not supports color prompt by default to get this feature on windows one can either use third party console emulator like ConEmu or install ANSI escape sequences. You can use third party console emulators but I like windows default command prompt program for so many reasons like some tools do not work in console emulators.
Lets get started and setup our Terminal tool kit with a color command prompt and ASCII Art Logo.
First of create a new folder for Terminal tools Repository on your computer in D: drive name it Terminal this folder will be collection of tools and scripts we add the tools time to time in this folder.
[*] Install ANSI escape sequences
1- Download source code of ANSICON from https://github.com/adoxa/ansicon and compile it yourself or get a binary version from this link http://www.mediafire.com/download/uq84ohlfztibxo8/ansi153.zip
2- Extract ansi153.zip to D:\Terminal
3- Go into x86 directory and drag ansicon.exe into command prompt window and type -i with a space character before it. then hit enter this will install ANSICON ANSI escape sequences.
 or navigate to x86 directory via command prompt as in image bellow 



To verify ANSICON install type following command in command prompt
         type "D:\Terminal\ansi153\ANSI Prompt Colours.txt"
this should print the colors with their scape sequence codes.
 [*]  Custom command prompt with ASCII art logo
1- For ASCII art logo goto patorjk.com/software/taag/

2- Generate your logo and copy it make a new text file terminal.txt in D:\Terminal directory and paste the copied logo in terminal.txt file
1- Open a text editor i.e notepad (I use notepad++) type following code into a new file
                    @echo off
          set TERMINAL=D:\Terminal

          title [TerminaL]
          type %Terminal%\terminal.txt
          cmd /k prompt $e[1;33;40m[$n:]Terminal #:$e[0;37;40m

 2 - Save file as terminal.cmd in C:\Windows\System32 directory.
 You can download Terminal.cmd and Terminal.txt files here https://www.mediafire.com/?d91agfmnfdbbwvo


Friday, 4 July 2014

[1] Customize the command prompt:


I love old days command prompt and TUI (Text User Interfaces) over the years I have collected long list of command line scripts and third party tools and I have named those tools Terminal ToolKit. Many people often ask me to share these tools and tricks with them. So  now I have decided its better to share all the info over internet with those people who love command prompt.
You can use these tools for your daily and most common tasks.
[*]What is Terminal toolkit basically?
its nothing more than a customized cmd.exe aka windows command prompt.!
lets begin to customize now.
[1] Customize the properties of Command Prompt.
1- To open command prompt, open run dialog box with WIN+R and type cmd and hit Enter key.

2- Right click on title bar of cmd window and click on properties.


3- Enable both edit optins Quick Edit Mode and Insert mode.

       QuickEdit Mode. This option provides an easy way to copy text from (and paste text into) Command Prompt windows with a mouse.
           Insert Mode. This setting (which is on by default) allows you to insert text at the cursor position. Clearing the Insert Mode check box setting will allow you to overstrike characters instead. 

3- Next to customize font. Click on font tab -> select font size. and select Lucida Console fonts.

4- Click on Layout tab change the Screen Buffer Size width and height, and Windows Size width and height
 Screen Buffer Size is number of characters which command prompt can occupy vertically and horizontally on the screen. 

5 To change background color or text color click on Colors tab and choose colors if you want. I like default colors :-)
      Note: For color command prompt follow my next post.