Tag Info

New answers tagged

2

The argument to a LS_COLORS directive is a string that is written to the terminal as part of an escape sequence. When displaying a file name, ls writes \e[, then the string associated with the file type, then m, then the file name, then \e[0m (where \e represents an escape character). This is the escape sequence that tells xterm and compatible terminals ...


0

I suggest you check out ZSH and its plugin oh-my-zsh which has one of the most powerfull console features that I saw. One of them is picking theme for your terminal. This is example of my theme... In tty the colors are not so warm but they are the same like in this picture... Any way you will love it!


0

For setting the prompt, I have this in my .bashrc file. #Set variables for foreground colors fgRed=$(tput setaf 1) ; fgGreen=$(tput setaf 2) ; fgBlue=$(tput setaf 4) fgMagenta=$(tput setaf 5) ; fgYellow=$(tput setaf 3) ; fgCyan=$(tput setaf 6) fgWhite=$(tput setaf 7) ; fgBlack=$(tput setaf 0) #Set variables for background colors bgRed=$(tput setab 1) ...


7

Most programs that produce color will, by default, only produce it when the output is to a terminal, not a pipe or file. Generally, this is a good thing. Often, however, there is an override switch. For example, for ls, one can use --color=always and, as a result, color can be saved in shell variables. For example: grep also supports the ...


1

In XTerm, you can use the control sequences in your .bashrc or such. Like: if tty -s; then case $HOSTNAME in server1) echo -e '\e]11;darkgray\a\e]10;black\a' ;; server2) echo -e '\e]11;darkblue\a\e]10;gray\a' ;; esac fi Other terminal emulators have similar features. In Putty, you can configure the color directly, not sure if these control ...


0

I rigged together a Ruby script (using Inkscape and ImageMagick as subroutines) pdfinvert. It proceeds as follows: Split PDF into individual pages. Convert each page to SVG. Invert colors┬╣ in the SVG; embedded PNG images are taken care of┬▓. Reconvert each page to PNG. Join pages together for the final result. It was designed for drawings but it may work ...


1

Since you're using "su -" the shell being executed is pretending like it's a login shell (executing the system's /etc/profile, the user's profile, such as .profile or .bash_profile, and so on). One of those scripts is generating the escape sequence (the Esc]P string) and printing that result to stdout. It shouldn't do that. What it should be doing is ...


2

There is currently no way to do this. See this accepted answer on stackoverflow which suggests changing pane-borders instead. You can set values for pane-active-border-style and pane-border-style in your ~/.tmux.conf. See this answer for more details configuring these values (and some inconsistencies between tmux versions).


3

Use W (capital w) to save the top configuration after you made your changes.


0

It's not possible with the current version of xfce-terminal (4.12), since it uses an ancient, Gtk+2-based vte for terminal emulation. You should wait until they port their code to the new, Gtk+3-based vte, or switch to another terminal emulator (e.g. gnome-terminal).


1

In lots of places, depending On virtual terminals and real terminals, the TERM environment variable is set by the program that chains to login, and is inherited all of the way along to the interactive shell that executes once one has logged on. Where, precisely, this happens varies from system to system, and according to the kind of terminal. Real, ...


0

Please see http://askubuntu.com/a/614714/398785 for my detailed answer on why I think TERM=xterm-color is the wrong approach and Ubuntu's .bashrc is obsolete. I recommend that you go with TERM=xterm-256color (which is the default since gnome-terminal 3.16, but also safe to use with older gnome-terminals), and adjust your .bashrc accordingly.


-1

PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;34m\]\$ \[\e[m\]\[\e[1;31m\]' You can fix this by changing the output colour, below is an example for the same. PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;34m\]\$ \[\e[m\]\[\e[1;32m\]' The above command displays the below output in green


2

You can use a trap to achieve this: trap 'echo -ne "\e[0m"' DEBUG According to bash's man: a trap on DEBUG executes before every simple command, for command, case command, select command, every arithmetic for command, and before the first command executes in a shell function So every time you execute the command, the shell will insert \e[0m ...


1

try this plugin tmux-copycat support highlight search Prefix + / quick enter search mode auto clean search mode (in F7 search, next time search will keep last statement)



Top 50 recent answers are included