Added 'tonka' prompt, and personal color scheme.
authorDaniel Engel <daniel.engel@gmail.com>
Tue, 15 Mar 2011 00:36:25 +0000 (20:36 -0400)
committerDaniel Engel <daniel.engel@gmail.com>
Tue, 15 Mar 2011 00:36:25 +0000 (20:36 -0400)
Added 'dirs' plugin, dor directory stack navigation.

aliases/general.aliases.bash
plugins/dirs.plugins.bash [new file with mode: 0644]
themes/tonka/tonka.theme.bash [new file with mode: 0644]

index 9d71a33..d91fbbb 100644 (file)
@@ -44,7 +44,6 @@ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
 # Directory
 alias  md='mkdir -p'
 alias  rd=rmdir
-alias d='dirs -v'
 
 function aliases-help() {
   echo "Generic Alias Usage"
@@ -61,7 +60,6 @@ function aliases-help() {
   echo "  h      = history"
   echo "  md     = mkdir -p"
   echo "  rd     = rmdir"
-  echo "  d      = dirs -v"
   echo "  editor = $EDITOR"
   echo "  pager  = $PAGER"
   echo "  piano  = pianobar"
diff --git a/plugins/dirs.plugins.bash b/plugins/dirs.plugins.bash
new file mode 100644 (file)
index 0000000..dfa9a32
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# Directory stack navigation:
+#
+# Add to stack with: pu /path/to/directory
+# Delete current dir from stack with: po
+# Show stack with: d
+# Jump to location by number.
+
+# Show directory stack
+alias d="dirs -v -l"
+
+# Change to location in stack bu number
+alias 1="pushd"
+alias 2="pushd +2"
+alias 3="pushd +3"
+alias 4="pushd +4"
+alias 5="pushd +5"
+alias 6="pushd +6"
+alias 7="pushd +7"
+alias 8="pushd +8"
+alias 9="pushd +9"
+
+# Clone this location
+alias pc="pushd \`pwd\`"
+
+# Push new location
+alias pu="pushd"
+
+# Pop current location
+alias po="popd"
+
+function dirs-help() {
+  echo "Directory Navigation Alias Usage"
+  echo
+  echo "Use the power of directory stacking to move"
+  echo "between several locations with ease."
+  echo
+  echo "d      : Show directory stack."
+  echo "po     : Remove current location from stack."
+  echo "pc     : Adds current location to stack."
+  echo "pu <dir>: Adds given location to stack."
+  echo "1      : Chance to stack location 1."
+  echo "2      : Chance to stack location 2."
+  echo "3      : Chance to stack location 3."
+  echo "4      : Chance to stack location 4."
+  echo "5      : Chance to stack location 5."
+  echo "6      : Chance to stack location 6."
+  echo "7      : Chance to stack location 7."
+  echo "8      : Chance to stack location 8."
+  echo "9      : Chance to stack location 9."
+}
diff --git a/themes/tonka/tonka.theme.bash b/themes/tonka/tonka.theme.bash
new file mode 100644 (file)
index 0000000..2b28c96
--- /dev/null
@@ -0,0 +1,39 @@
+prompt_setter() {
+
+#   Named "Tonka" because of the colour scheme
+local WHITE="\[\033[1;37m\]"
+local LIGHT_BLUE="\[\033[1;34m\]"
+local YELLOW="\[\033[1;33m\]"
+local NO_COLOUR="\[\033[0m\]"
+
+case $TERM in
+    xterm*|rxvt*)
+        TITLEBAR='\[\033]0;\u@\h:\w\007\]'
+        ;;
+    *)
+        TITLEBAR=""
+        ;;
+esac
+
+PS1="$TITLEBAR\
+$YELLOW-$LIGHT_BLUE-(\
+$YELLOW\u$LIGHT_BLUE@$YELLOW\h\
+$LIGHT_BLUE)-(\
+$YELLOW\$PWD\
+$LIGHT_BLUE)-$YELLOW-\
+\n\
+$YELLOW-$LIGHT_BLUE-(\
+$YELLOW\$(date +%H%M)$LIGHT_BLUE:$YELLOW\$(date \"+%a,%d %b %y\")\
+$LIGHT_BLUE:$WHITE\\$ $LIGHT_BLUE)-$YELLOW-$NO_COLOUR "
+
+PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR "
+
+}
+
+PROMPT_COMMAND=prompt_setter
+
+export PS3=">> "
+
+LS_COLORS='no=00:fi=00:di=00;33:ln=01;36:pi=40;34:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:';
+
+export LS_COLORS