Terminal Shenanigans

Terminal Shenanigans


2005 Mar 20 • 6507
Everyone ignore this.

I'm constantly having to re-choose the palette for my gnome-terminal on various different machines. So I'm just going to paste it here to make things easier.

This goes in:

xml code

<entry name="palette" mtime="1303844291" type="string">

And while I'm at it here's my kickass bash prompt. The idea is to have a different color for each machine you might SSH to.

It includes the current git branch as well, if there is one.

bash code

host=$( hostname | tr '[:upper:]' '[:lower:]' )
case $host in
machine1) HOSTCOLOR=31 ;;
machine2) HOSTCOLOR=91 ;;
machine3) HOSTCOLOR=35 ;;
machine4) HOSTCOLOR=90 ;;
machine5) HOSTCOLOR=96 ;;
machine6) HOSTCOLOR=34 ;;
machine7) HOSTCOLOR=32 ;;
machine8) HOSTCOLOR=95 ;;
*) HOSTCOLOR=93 ;;
PS1='\[\e[90m\]\D{%H}\[\e[37m\]\D{%M}\[\e[90m\]\D{%S} \[\e[$(echo $HOSTCOLOR)m\]\u@\h \[\e[33m\]\W\[\e[36m\]$(__git_ps1 "(%s)")\[\e[33m\]\$\[\e[m\] '

2011 Apr 26 at 19:23 PDT — Ed. 2011 Apr 26 at 19:39 PDT
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
Clevers :) I don't ssh to many places but the one that I do switch to looks considerably different, they appear to use an older version of bash.
2011 Apr 27 at 04:04 PDT
Page [1]