diff --git a/.bash/.bash b/.bash/.bash new file mode 120000 index 0000000..082e547 --- /dev/null +++ b/.bash/.bash @@ -0,0 +1 @@ +/home/pfernandes/dotfiles/.bash \ No newline at end of file diff --git a/.bash/git-aware-prompt b/.bash/git-aware-prompt new file mode 160000 index 0000000..b032b41 --- /dev/null +++ b/.bash/git-aware-prompt @@ -0,0 +1 @@ +Subproject commit b032b4156241182a69c2bce36bddb97469194336 diff --git a/.bashrc b/.bashrc index 1710080..6a5fd2e 100644 --- a/.bashrc +++ b/.bashrc @@ -1,3 +1,5 @@ +export GITAWAREPROMPT=~/.bash/git-aware-prompt +source "${GITAWAREPROMPT}/main.sh" # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples @@ -84,7 +86,7 @@ unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\]" + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\] \$\[\e[0m\] " ;; *) ;; diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4b4d333 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule ".bash/git-aware-prompt"] + path = .bash/git-aware-prompt + url = https://github.com/jimeh/git-aware-prompt.git diff --git a/install.sh b/install.sh index d674c5e..c1f6292 100755 --- a/install.sh +++ b/install.sh @@ -4,6 +4,7 @@ for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do mv -f ~/$file{,.dtbak} fi ln -s $PWD/$file ~/$file + ln -s $PWD/.bash ~/.bash done if hash vim-addon 2>/dev/null; then echo "vim-addon (vim-scripts) installed" diff --git a/uninstall.sh b/uninstall.sh old mode 100644 new mode 100755 index 52b3c17..ec52b98 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,6 +2,7 @@ for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do if [ -h ~/$file ]; then rm -f ~/$file + rm -rf ~/.bash fi if [ -e ~/${file}.dtbak ]; then mv -f ~/$file{.dtbak,}