• Enable Colorful Terminal


    I want to have a colorful terminal like in this post: Enable Colorful Terminal in Debian and Ubuntu.
    It should look something like this:
    console2

    However, adding force_color_prompt=yes to .bashrc does not seem to work in Antergos. Is there another way to enable colors?

  • @Lilalas
    i’m newbie, but in my studies i read about “fish shell” wich seems to be what you’re looking for, color, suggestions etc. I’m thinking about installing it…

    https://fishshell.com/

    EDIT: I just installed and i think is very nice and useful.
    to install:
    pacman -S fish

    after install simple tap fish

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

  • I found a solution by myself:

    I have copied a few lines from the .bashrc file generated by Ubuntu and appended them to my .bashrc file.

    # FILE: ~/.bashrc
    # ---------------
    
    force_color_prompt=yes
    
    if [ -n "$force_color_prompt" ]; then
        if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    	# We have color support; assume it's compliant with Ecma-48
    	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
    	# a case would tend to support setf rather than setaf.)
    	color_prompt=yes
        else
    	color_prompt=
        fi
    fi
    
    if [ "$color_prompt" = yes ]; then
        PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$ '
    else
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    fi
    unset color_prompt force_color_prompt
    
    # enable color support of ls and also add handy aliases
    if [ -x /usr/bin/dircolors ]; then
        test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
        alias ls='ls --color=auto'
        alias dir='dir --color=auto'
        alias vdir='vdir --color=auto'
    
        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
    fi
    
    # colored GCC warnings and errors
    #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
    
    # some more ls aliases
    alias ll='ls -alF'
    alias la='ls -A'
    alias l='ls -CF'
    

    I do not understand everything but it works just fine.

  • @fernandomaroto
    Thank you for your advice! fish is nice too but not exactly what I wanted. Fortunately I have discovered how to do enable the colors anyhow.

  • @Lilalas Excuse for troubling. I see at you the terminal in Russian language. If it is sometime interesting to you to establish fortune, perhaps you will be interested by a way of the forune-mod-ru installation.
    0_1475693093279_tux : bash — Konsole_001.jpg

    Russian fan club of Antergos

  • @Lilalas said in Enable Colorful Terminal:

    @fernandomaroto
    …not exactly what I wanted…

    4yo Fedora article is still valid and works nicely in Arch. Colorize and customize the bash prompt any way you like.

  • Excuse me, how can I mark this thread as solved?

  • @Lilalas There’s TOPIC TOOLS button in the lower right corner of the forum:
    0_1475770062921_antergos-forum-mark-as-solved-01.png
    When you click it, the popup menu opens:
    0_1475770089509_antergos-forum-mark-as-solved-02.png
    Select Mark as Solved from it.

    Done.

  • @tuxnot ​Спасибо за твою рекомендацию, но это не мой терминал. Я не много могу говорить по-русски. :wink: I hope this was right.
    This is just a random picture I found on the internet. :stuck_out_tongue:

  • @just said in Enable Colorful Terminal:

    @Lilalas There’s TOPIC TOOLS button in the lower right corner of the forum:
    […]
    Select Mark as Solved from it.

    Done.

  • @just said in Enable Colorful Terminal:

    4yo Fedora article is still valid and works nicely in Arch. Colorize and customize the bash prompt any way you like.

    Thank you! This article helped me understanding the code.

colorful1 color4 bash1 terminal27 Posts 11Views 951
Log in to reply