Cain Manor

Your Guide To All Things Cain™

OS-X Terminal Tastiness

I like the Ter­mi­nal in OS-X.  How­ever, there are a few things you can do to make it much nicer.

The most impor­tant step is the Visor Plu­gin. it gives you a quake like drop down win­dow for your ter­mi­nal. I bind my ter­mi­nal to Com­mand+\.  The orig­i­nal devel­oper also wrote quick­sil­ver, and he now works for Google.

Next add a plu­gin that allows you to change your ter­mi­nal col­ors, called appro­pri­ately enough TerminalColours.bundle. The main google link brought me to an installer that didn’t work for me, but seemed to be the offi­cial link. The pre­vi­ous link is to a page that has a bun­dle that installed as expected.

Now let’s get the color lay­out that’s so easy on the eyes. I found IR_Black, and it works very well. You just have to down­load it and dou­ble click the .ter­mi­nal file.

To rename the ter­mi­nal tabs, I had to use yet another bun­dle — TabNamer.bundle. The nor­mal Unixy way of chang­ing ter­mi­nal titles doesn’t work reli­ably for OS-X.

Next, make sure you’ve got a very nice prompt.  This is my .bash_profile.  If you’re on OS-X, you can copy this to your ~/.profile and as it sit it will work.

set -o vi
 
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
 
alias ...='cd ../..'
alias ?='history | grep $1'
alias grep='GREP_COLOR="1;37;41" LANG=C grep --color=auto'
alias ll='ls -laF'
alias ls='ls -A'
 
alias cm='echo Connecting to cainmanor.com; ssh xxx@xxx.xxx -p 12345'
alias home='echo Connecting to Cain Manor; ssh xxx@xxx.xxx -p 12345'
 
alias gssh='echo $1;ssh $1 -l greg.cain'
alias rssh='echo $1;ssh $1 -l root'
 
alias hog10='ps -e -o pid,pcpu,cpu,nice,state,cputime,cmd --sort -pcpu | sed "/^ o.o /d" | head -n 10'
alias hog='ps -e -o pid,pcpu,cpu,nice,state,cputime,cmd --sort -pcpu | sed "/^ o.o /d"'
 
alias serve='hostname;python -m SimpleHTTPServer 8080'
 
# If id command returns zero, you’ve root access.
if [ $(id -u) -eq 0 ];
then # you are root, set red colour prompt
	PS1="\e[0;31m[ \u@\h:\e[0;34m\w \e[0;31m] \e[m"
  else # normal
	PS1="\e[0;32m[ \h:\e[0;34m\w \e[0;32m] \e[m"
fi

Lastly, refer back to my ear­lier post for nicer fonts.

This is what my Ter­mi­nal looks like now.  It’s avail­able in all Spaces, and avail­able at the touch of a key (or two keys.)

after

One Comment

  1. Thanks for using my Tab­Namer project!