Tagged Questions

It is possible to use colors on the Unix command-line interface.

learn more… | top users | synonyms (1)

1
vote
0answers
21 views

How can I get red letters with tput when I seem to get yellow?

I was using #!/bin/sh if [ $TERM=screen ] then pass_color=' \033[01;32m' fail_color=' \033[01;31m' fi echo "$pass_color green $fail_color red" as in but I was advised to use tput instead, so ...
1
vote
0answers
15 views

grc: Highlight capture groups only?

Recently I came across grc and I find it really simple. However, I would like to highlight some chunks of regex-matched text. For example, svn status properties conflict highlight I hoped to work: ...
2
votes
1answer
42 views

Printing filled shapes in terminal

I'd like to print some shapes filled with the current color or a selected one (e.g. \e[31m) My aim is to print a filled circle (letter o) on the screen but the background will stay as it is. finally ...
2
votes
1answer
35 views

Terminator custom colors overriden by KDE

I've been working on Solarized theme in Terminator (http://gnometerminator.blogspot.fr/p/introduction.html) for about a year on Gnome and have been very satisfied. Yesterday I switched to KDE and the ...
2
votes
2answers
50 views

Format terminal output to show apt-get upgrade errors in RED

I have a very simple bash script written for my Kali Linux distro so I don't have to run apt-get update, apt-get upgrade, apt-get dist-upgrade, apt-get autoclean, and apt-get autoremove every time I ...
0
votes
0answers
9 views

acoc: availability, similar projects and problems?

I am trying to work on a Linux project out of Linux From Scratch. The outcome is a Linux with dull command line and console. I tried to bring color to terminal and I hit some bits and pieces like ...
0
votes
0answers
25 views

Powerline bash prompt not colorized in tmux

The bash/zsh commandline prompt is not displaying colors in tmux, even though I managed to get the powerline itself working (with colors). The prompt works fine in pure bash/zsh. I am getting the ...
1
vote
0answers
23 views

How to force custom color scheme when using Inverted Colors in Evince?

As pointed out in Software to read PDFs with inverted colors (Windows), instead of having a very white on very black color scheme (which induces a very nasty contrast) it is often preferable to use a ...
1
vote
0answers
7 views

Modifying displayed pixels [migrated]

Is it possible to easily modify individual pixels displayed on a screen according to a function? For example, suppose a pixel on the screen had values in (Red,Green,Blue) = (25,50,100) and I want to ...
3
votes
0answers
56 views

How to change background color of a pane in tmux?

I would like to change the background color of the inactive panes in tmux to better distinguish between the active pane and inactive panes. Something just a few shades different than the default. How ...
2
votes
1answer
52 views

Red and blue are switched in xfce

I have a BeagleBone Black, wich is connected to a TV via HDMI. When I boot up the BeagleBone Black using a minimal Ubuntu image, I can see Tux greeting me in all his three-color glory, yellow feet and ...
17
votes
2answers
953 views

Are the terminal color escape sequences defined anywhere for bash?

I've used every so often colors in Bash scripting (mostly on CentOS), but to make their usage more convinient I end up redefining variables to color values: local GRAY="\[\033[1;30m\]" local ...
0
votes
1answer
122 views

Using Grep Colour to look in a file, and output with a coloured answer in amongst the file contents

I am currently in the process of writing a program in raspberry pi that will allow me to look inside files and have what I entered displayed in colour I think I need to do something to do with ...
4
votes
2answers
52 views

Sorting strings with ANSI escape codes

I am trying to print a sorted list of all zsh options, with set options colored green and unset options colored red. I cannot get sort to work properly with on the colored lines though.The below ...
2
votes
2answers
62 views

Non-printing escape sequence: when?

Recently, I have been playing around a lot with color in the terminal and, therefore, with escape sequences, too. I've read the relevant parts of the Bash manpage along with numerous helpful pages on ...
0
votes
1answer
33 views

colors not being expanded in zsh print -P

I have a zsh prompt script that uses print -P to perform prompt expansion. The script does not work properly on a particular remote system that I ssh into. The color directives in the prompt print ...
5
votes
1answer
113 views

How to colourise hidden files in `ls` file listings?

LS_COLORS environmental variable lets you decide on colours for different file types for ls command, such as, directories, regular files, links etc. I suppose that dot files are considered a variation ...
1
vote
0answers
471 views

Terminal colors for Vim Airline and Tmux Tmuxline

When using Vim on its own with Vundle and Airline the theme appears normally: When I have loaded it up in Tmuxline, the theme uses different colors and even Vim looks different: Here's my Tmux ...
7
votes
3answers
597 views

Git pager is less, but what is causing the output coloring?

less itself isn't capable of doing syntax highlighting, according to this thread. However, git diff nicely shows colored output in less, its default pager. When I redirect the output of git diff ...
1
vote
2answers
59 views

Which part of this bash PS1 config determine the color?

I got my git branch color set by this tutorial:http://www.bramschoenmakers.nl/en/node/624 But recenlty I've reverted my terminal background color, and the yellow branch name is nearly invisible under ...
5
votes
2answers
145 views

How do I preserve coloured output when piping to `less -R`?

$ ffmpeg -v debug ... Coloured output. $ ffmpeg -v debug ... |& less -R Dull output. How do I make the output coloured while piping it to something?
1
vote
1answer
72 views

Terminal colors putty raspbian

I'm connecting to my Raspberry Pi from my Windows Machine using putty. I already adjusted the colors for bold blue in putty to be more readable (using this guide). But I still have problems with the ...
0
votes
0answers
13 views

Determin if the currnet terminal has a dark or light theme [duplicate]

I have several (Bash) scripts that uses ASCII color codes. They look good on my dark themed terminal, however on my colleagues light themed terminal the colors I selected don't look that good. Is ...
18
votes
2answers
1k views

Coloring different sources for tail

I'm watching different logs by tail -q -f /var/log/syslog -f /var/log/fail2ban.log -f /var/log/nginx/error.log How can I have the output of each log colored differently?
4
votes
1answer
48 views

Make `most` pager properly handle colours from standard‑input

How do I make the most pager properly display colours in text received from standard‑input? Note: I'm not sure whether or not it's a bug in most. I am not encountering the same issue with less and ...
2
votes
1answer
85 views

Defining color codes in rxvt-unicode

Using some of node.js tools like mocha in my urxvt terminal, I have some problems with coloured output. Some of the text that are using colour code 90 as you can see here will be disappeared in ...
1
vote
1answer
60 views

Less command change color of “~” and “(END)”?

How do I change the color of the "~" characters that go along the edge of a Less command output. And how to change the color "(END)" at the bottom?
0
votes
1answer
67 views

Color of emacs margins

With the following in my .emacs I get narrow margins in text-mode buffers: (defun my-set-margins () "Set margins in current buffer." (setq left-margin-width 30) (setq right-margin-width 30)) ...
3
votes
1answer
60 views

Fine-tune LS_COLORS for directory suffixes?

I’m fine customizing most settings in LS_COLORS. I don’t need help customizing the colors for different file suffixes. What I would like to do is configure special colors for certain directories, ...
2
votes
0answers
85 views

Change color balance on Intel Graphics

My laptop has some screen or cable problem, because of which the screen is all pink colour. In Windows I use my Graphic Card configuration software to change the screen colours mixing colour channels ...
2
votes
1answer
207 views

vim: Use different colorscheme when connected over SSH

On my desktop I use the hbrid color scheme in vim, with the preferred colors set for my consoles 16-color palette (as described in the README). However, on my laptop, I use the solarized color ...
1
vote
1answer
69 views

tmux hightlight colour setting

In tmux, the default highlight setting is a yellow background -- at least on my version and machine. This is when using the mouse on X11 but is the same with the console selection. I cannot find the ...
0
votes
1answer
2k views

Change colors for the Pantheon terminal emulator

I am using Elementary OS (based on Ubuntu 12.04) and I would like to change the coloring scheme for Pantheon Terminal window. Here's what I've tried: Elementary Tweaks Dconf Editor shell commands ...
7
votes
3answers
488 views

How to permanently change both STDOUT and STDERR color to grey?

This question is similar to Can I configure my shell to print STDERR and STDOUT in different colors? But I am looking for a solution that will allow me to change both STDOUT and STDERR to ONE color. ...
2
votes
1answer
63 views

Strip color on OS X with BSD sed (or any other tool)

I'm on OS X, which has a BSD version of sed (which I'm guessing is inferior to a GNU version on Linux), and all the techniques for removing color on commandlinefu.com did not work. I tried replacing ...
7
votes
1answer
296 views

How do I use colors in the MOTD?

I edited the default /etc/update-motd.d/00-header, adding some color to make it easier to read: printf "Welcome to \e[1;34m%s\e[0m \e[2m(%s %s %s)\e[0m\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" ...
4
votes
3answers
316 views

cascaded grep matches color code as pattern

I am piping output of one grep comand into another grep. The first grep is using --color=always, so that the first match is colored. In practice, that means that the match is enclosed between two ...
0
votes
1answer
49 views

Location of colorscheme-files in Kate

In Kate one can export file Fortran.katehlcolor which store the information about color in syntax-highlighting. The syntax-highlighting files itself are located in ~/.kde/share/apps/katepart/syntax ...
1
vote
1answer
435 views

How to change the output color of ls comman in terminal in OS X and iTerm2?

I know that a similar question has been as in: How to colorize output of ls ? Though, I didn't really understand the answer and couldn't really make it work. However, I have tried something ...
2
votes
2answers
303 views

256 Colors in xterm and tmux [in FreeBSD 10]

So these past few days I am working to make Xterm and tmux show all the 256 colors available in them by default. I reach these conclusions: for tmux to show 256 colors you have to make xterm to ...
1
vote
0answers
58 views

Why does vim color this .bashrc line incorrectly? Fixable?

I have the following line in my .bashrc that allows me to use rlwrap with sqlplus. Why does vim seem to color this wrong? alias sqlplus='rlwrap -c -f /usr/bin/rlwrap -b ...
0
votes
1answer
69 views

How to get the same ls with colors working on both OSX and Ubuntu?

When I want color in Ubuntu I do alias ls='ls --color=always' but on OSX this gives an error ls: illegal option -- - and I need to do alias ls ='ls -G' How can I create an alias with the same ...
1
vote
3answers
68 views

colourize the first part of each line

I have some chat logs like: (15:12:56) rubo77: mist migration (15:05:22) hans: ist hugo da? (15:36:13) rubo77: test (13:30:15) rubo77: what are the access data? (15:06:38) someone@jabber.ccc.de: user ...
4
votes
2answers
2k views

How to change font colors in terminal?

I know how to change the font color via preferences, but it changes the color of ALL text, as in below:     What I'm going for is something more like this:     Any ...
10
votes
2answers
493 views

Filter output of command by color

I am running a utility that doesn't offer a way to filter its output. Nothing in the text of the output indicates that a particular function failed but it does show in red. The output is so long that ...
5
votes
2answers
114 views

How would I add a prefix to input I receive from a pipe via awk and color the prefix conditionally?

Is there a way to add a prefix to lines received (and filtered) via awk - yes I know that's possible so far - and then conditionally (e.g. based on the existence of the $PS1 variable of the ...
2
votes
1answer
6k views

set gnome terminal background/text color from bash script

I would like to setup my gnome terminal's background(#002b36) and foreground color in ubuntu 13, using bash script. I tried gconftool but couldn't succeed. GCONFTOOL-2(1) User ...
1
vote
1answer
66 views

Emacs, complete list of color “keys”

If you want to customize the colors in Emacs, specifying them in the .emacs init file, without installing any extra package, and without using a pre-made theme, something like this seems to work: ...
4
votes
1answer
104 views

Highlighting text in bash when using reverse history search using Ctrl-R

Using Ctrl-R, I can search the history in bash. But what to do, If I want to highlight the relevant word which has been typed upon by me. Example: (reverse-i-search)`mount': sudo mount /dev/sda2 ...
0
votes
0answers
83 views

Schemes for linux tty and xterm

I actually prefer the font and colorscheme used when I'm in a tty terminal. After I start up a window manager, the colorscheme and font are completely different when I'm in xterm -- which is expected. ...