Permalink
Browse files

Added .bash*

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent 4bdbb2c commit 45892460244535abd1e3a44e6c0f0ded05776072 @trofi committed Oct 15, 2011
Showing with 213 additions and 0 deletions.
  1. +8 −0 .bash/colors
  2. +34 −0 .bash/dirs
  3. +30 −0 .bash/funs
  4. +40 −0 .bash/profile
  5. +32 −0 .bash/rc
  6. +53 −0 .bash/vars
  7. +8 −0 .bash_profile
  8. +8 −0 .bashrc
View
@@ -0,0 +1,8 @@
+red='\e[01;31m'
+green='\e[01;32m'
+yellow='\e[01;33m'
+blue='\e[01;34m'
+magenta='\e[01;35m'
+cyan='\e[01;36m'
+white='\e[01;37m'
+normal='\e[0;39m'
View
@@ -0,0 +1,34 @@
+# Begin ~/.bash/dirs
+# Personal aliases and functions.
+
+path_append () {
+ # First remove the directory
+ local IFS=':'
+ local NEWPATH
+ for DIR in $PATH; do
+ if [ "$DIR" != "$1" ]; then
+ NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
+ fi
+ done
+ # Then append the directory
+ export PATH=$NEWPATH:$1
+}
+
+path_prepend () {
+ # First remove the directory
+ local IFS=':'
+ local NEWPATH
+ for DIR in $PATH; do
+ if [ "$DIR" != "$1" ]; then
+ NEWPATH=${NEWPATH:+$NEWPATH:}${DIR}
+ fi
+ done
+ # Then append the directory
+ export PATH=$1:$NEWPATH
+}
+
+
+export CVSROOT=/srv/cvsroot
+
+
+#End ~/.bash/dirs
View
@@ -0,0 +1,30 @@
+# Begin ~/.bash/funs
+# Personal functions
+
+x(){
+ xinit -- \
+ "$@" \
+ -nolisten tcp
+}
+
+wm (){
+ # undone
+ _WM="$1"
+ shift
+ WM="$_WM" x "$@"
+}
+
+m () {
+ nyxmms2 clear
+ local was_playlist=no
+ for pl in *.cue *.Cue
+ do
+ if [ -f "$pl" ]; then
+ was_playlist=yes
+ nyxmms2 addpls "$pl"
+ fi
+ done
+ if [ "$was_playlist" = "no" ]; then
+ nyxmms2 add .
+ fi
+}
View
@@ -0,0 +1,40 @@
+# Begin ~/.bash/profile
+path_append () {
+ # First remove the directory
+ local IFS=':'
+ local NEWPATH
+ for DIR in $PATH; do
+ if [ "$DIR" != "$1" ]; then
+ NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
+ fi
+ done
+ # Then append the directory
+ export PATH=$NEWPATH:$1
+}
+
+path_prepend () {
+ # First remove the directory
+ local IFS=':'
+ local NEWPATH
+ for DIR in $PATH; do
+ if [ "$DIR" != "$1" ]; then
+ NEWPATH={NEWPATH:+$NEWPATH:}${DIR}$
+ fi
+ done
+ # Then append the directory
+ export PATH=$1:$NEWPATH
+}
+
+if [ -f "$HOME/.bashrc" ] ; then
+ source $HOME/.bashrc
+fi
+
+if [ -d "$HOME/bin" ] ; then
+ path_prepend $HOME/bin
+fi
+
+if [ -d "$HOME/.cabal/bin" ] ; then
+ path_prepend $HOME/.cabal/bin
+fi
+
+# End ~/.bash/profile
View
@@ -0,0 +1,32 @@
+# Begin ~/.bash/rc
+# Personal aliases and functions.
+
+if [ -f "$HOME/.bash/dirs" ] ; then
+ source $HOME/.bash/dirs
+fi
+
+if [ -f "$HOME/.bash/alias" ] ; then
+ source $HOME/.bash/alias
+fi
+
+if [ -f "$HOME/.bash/colors" ] ; then
+ source $HOME/.bash/colors
+fi
+
+if [ -f "$HOME/.bash/vars" ] ; then
+ source $HOME/.bash/vars
+fi
+
+if [ -f "$HOME/.bash/funs" ] ; then
+ source $HOME/.bash/funs
+fi
+
+
+#if [ -f "/etc/bashrc" ] ; then
+# source /etc/bashrc
+#fi
+
+[[ -f /etc/profile.d/bash-completion.sh ]] &&
+ source /etc/profile.d/bash-completion.sh
+
+#End ~/.bash/rc
View
@@ -0,0 +1,53 @@
+# Begin ~/.bash/vars
+# Personal aliases and functions.
+
+if [ "$TERM" = "rxvt-unicode" ] ; then
+ export TERM=rxvt
+fi
+
+if [ "$TERM" = "xterm" ] ; then
+ export TERM=xterm-color
+ export COLORTERM=xterm
+fi
+
+if [ "$TERM" = "xterm-color" ] ; then
+ export COLORTERM=xterm
+fi
+
+export LANG=ru_RU.UTF-8
+export LANGUAGE=ru_BY:ru_RU:ru:en_GB:en
+export LC_ALL=""
+
+G_FILENAME_ENCODING="@locale"
+G_BROKEN_FILENAMES=1
+export G_FILENAME_ENCODING G_BROKEN_FILENAMES
+
+PERLDOC_PAGER="less -isR"
+
+PAGER="most"
+export PAGER
+#PAGER="less"
+#LESS="-isR"
+#export LESS
+
+MAILDIR=$HOME/.maildir
+export MAILDIR
+
+export PS1='[sf]\w\$ '
+
+#PS1="\[\033[1;32m[sf]\] \[\033[1;33m\]\w\[\033[1;31m\]:\[\033[0;39m\]\[\033[00m\]"
+#PS2="\[\033[1;32m\]....\[\033[1;31\]m> \[\033[0;39m\]\[\033[00m\]"
+PS1="\[\033[01;32m\][sf] \[\033[01;33m\]\w\[\033[01;31m\]:\[\033[00m\]"
+PS2="\[\033[01;32m\]....\[\033[01;31m\]> \[\033[00m\]"
+
+export GROFF_NO_SGR=1
+
+export TSOCKS_CONFFILE=$HOME/.tscoks/conf
+
+unset XMMS_PATH
+
+export SDL_AUDIODRIVER=pulse
+
+export ECHANGELOG_USER="Sergei Trofimovich <slyfox@gentoo.org>"
+
+#End ~/.bash/vars
View
@@ -0,0 +1,8 @@
+# Begin ~/.bash_profile
+
+if [ -f "$HOME/.bash/profile" ]
+then
+ source $HOME/.bash/profile
+fi
+
+# End ~/.bash_profile
View
@@ -0,0 +1,8 @@
+# Begin ~/.bashrc
+
+if [ -f "$HOME/.bash/rc" ]
+then
+ source $HOME/.bash/rc
+fi
+
+# End ~/.bashrc

0 comments on commit 4589246

Please sign in to comment.