You can imagine what a barrage of stones pierced the air in response to the statement that the standard command-line kind of just boring. Oh well, boring, so boring. Just a few simple setup techniques - and the color palette "block utility" Terminal »(Terminal) can be greatly enhanced. Which, incidentally, can simplify the reading of the text information.
Bash-prompt, the command ls and characters of color
To the minimum necessary, let's improve the prompt, the output of diversity ls and enable the display of colors. All this can be done by editing the contents of the file .bash_profile or .bashrcWhich is located in your home directory. In this example, let's work with the first file:
- Open the "Terminal" and enter the command nano .bash_profile.
- Insert the following lines:
export PS1 = "[33 [36m] u [33 [m] @ [33 [32m] h: [33 [33; 1m] w [33 [m] $" export CLICOLOR = 1. export LSCOLORS = ExFxBxDxCxegedabagacad. alias ls = 'ls -GFh'
- press control+OTo save the changes, and control+XTo get out of nano-editor.
The first line indicates that the console prompt string bash-shell became displayed in color, and it became a kind of format username @ hostname: $ cwd. The next two lines include a command line support, and adjust the color display of the command output ls.
In the last line, we refer to the command ls, are included in this treatment a few flags. Flag -G includes a color in the output command stream, -h converts numeric values into understandable user units, and -F adds a slash (/) after the directory name.
If all the above steps, the command prompt window at another enabled nano editor will look like this:
After all the action open a new window "Terminal", run the command ls - and you will see the difference.
Bold, ANSI-colors and bright shades
All of the following will be tied to a specific color scheme (or profile). This means that each color scheme will need to be configured separately. For most schemes "Terminal" support the ANSI-colors is enabled by default, but if for some schemes, this option is turned off - turn it on.
- pressing command+, - or by selecting the menu command Terminal> Preferences (Terminal> Preferences)- open a Command Prompt window and navigate to the settings tab Settings (Settings).
- On the left, select any profile scheme, and the tab Text (Text) enable settings Use bold fonts (Use Bold Fonts) and Use bright colors for bold (Use bright colors for bold text).
Now, objects such as executable files and directories will be displayed in bold, and more bright color - so they will be easier to distinguish from other objects that are displayed as color text.
Background transparency, blur and wallpapers
After setting up the "color-coding" the command line, you can go to the parameters of the background window "Terminal":
- The same Configuration Utility window, select the desired item in the list of profiles and click on the tab Window (Window).
- Click on the button Color and effects (Color & Effects)To select the background color, steper its transparency and blur. Tip: a nice option when transparency is set to 80, and blur - 100%.
- Click on the drop-down list Image (Image)To select a background image. It is advisable to adhere to the principle: the dark pictures - for dark, light - for light profiles.
Typically, transparency settings and blur the background is enough, but if you ask even the background wallpaper, the results can exceed all expectations vyrviglaznoy picture. All in your hands.
plant layout
Color schemes for the "Terminal" can not only be created from scratch and set up a long time - they can be downloaded and installed. Here are three schemes, which are among the "konsolschikov" certain popularity:
- IR Black
- Peppermint
- Solarized
Before and after
Having done the above, the final result - the "Terminal" is not found, comparing it to what it was prior to the adjustment.
(via)