Konsole – Цветове като на Gentoo !!!
08.31.07
@ 11:34 PM
от GattaNegra
Добре, че се намери кой да ми даде тази информация – сега я слaгaм тук за да знам къде е.
bash #Put the following into your .bashrc: #ffect of the additonal code #Effect of the additonal code #Code: Exit Status Bash Foo COLOR_RED="\[\e[31;40m\]" COLOR_GREEN="\[\e[32;40m\]" COLOR_YELLOW="\[\e[33;40m\]" COLOR_BLUE="\[\e[34;40m\]" COLOR_MAGENTA="\[\e[35;40m\]" COLOR_CYAN="\[\e[36;40m\]" COLOR_RED_BOLD="\[\e[31;1m\]" COLOR_GREEN_BOLD="\[\e[32;1m\]" COLOR_YELLOW_BOLD="\[\e[33;1m\]" COLOR_BLUE_BOLD="\[\e[34;1m\]" COLOR_MAGENTA_BOLD="\[\e[35;1m\]" COLOR_CYAN_BOLD="\[\e[36;1m\]" COLOR_NONE="\[\e[0m\]" promptFunc() { PREV_RET_VAL=$?; PS1="" if test `whoami` != "root" then PS1="${PS1}${COLOR_CYAN_BOLD}\u${COLOR_NONE}" else PS1="${PS1}${COLOR_RED_BOLD}\u${COLOR_NONE}" fi PS1="${PS1}@\h" if test $PREV_RET_VAL -eq 0 then PS1="${PS1}${COLOR_GREEN_BOLD}\\$ ${COLOR_NONE}" else PS1="${PS1}${COLOR_RED_BOLD}\\$ [${PREV_RET_VAL}] ${COLOR_NONE}" fi } PROMPT_COMMAND=promptFunc #default colors #If you prefer original bash prompt, replace promptFunc with the following code: promptFunc() { PREV_RET_VAL=$?; PS1="" if test `whoami` != "root" then PS1="${PS1}${COLOR_GREEN_BOLD}\u@\h ${COLOR_BLUE_BOLD}\w" else PS1="${PS1}${COLOR_RED_BOLD}\h ${COLOR_BLUE_BOLD}\W" fi if test $PREV_RET_VAL -eq 0 then PS1="${PS1} ${COLOR_BLUE_BOLD}\\$ ${COLOR_NONE}" else PS1="${PS1} ${COLOR_RED_BOLD}[${PREV_RET_VAL}] \\$ ${COLOR_NONE}" fi }