--- /dev/null
+# Initialization for login shells.
+
+# Tell interactive shells to look in ~/.shinit for setup.
+ENV=$HOME/.shinit
+export ENV
+. $ENV
--- /dev/null
+# Settings for interactive shells.
+
+# Fancy colors for ls.
+alias ls="ls --color=auto"
+
+# Use vim as default editor for anything.
+export VISUAL=vim
+export EDITOR=$VISUAL
+
+# Colored prompt with username, hostname, date/time, directory.
+colornumber=7 # Default to white if no color set via colornumber dotfile.
+colornumber_file=~/.shinit_color
+if [ -f $colornumber_file ]; then
+ colornumber=`cat $colornumber_file`
+fi
+tput_color="$(tput setaf $colornumber)$(tput bold)"
+tput_reset="$(tput sgr0)"
+# Bash confuses the line length when not told to not count escape sequences.
+which_shell=`lsof -ap $$ -d txt | awk 'NR>1 {print $NF}'`
+if [ "${which_shell#*'bash'}" != "$which_shell" ]; then
+ tput_color="\[$tput_color\]"
+ tput_reset="\[$tput_reset\]"
+fi
+PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $USER@$(hostname):"\$\(pwd\)"]$ $tput_reset"
+PS2="${tput_color}> $tput_reset"
+PS3="${tput_color}select: $tput_reset"
+PS4="${tput_color}+ $tput_reset"
+
+# Add local additions.
+local_shinit_file=~/.shinit_add
+if [ -f $local_shinit_file ]; then
+ . $local_shinit_file
+fi
+++ /dev/null
-# plomlompom's bashrc for non-login shells (root)
-
-# Fancy colors for ls.
-alias ls="ls --color=auto"
-
-# Use vim as default editor for anything.
-export VISUAL=vim
-export EDITOR=$VISUAL
-
-# Red prompt with time.
-PS1="\[\e[1;31m\][\\t \\u@\\h \\w]$\[\e[m\] "
-PS2="\[\e[1;31m\]>\[\e[m\] "
-PS3="\[\e[1;31m\]>\[\e[m\] "
-PS4="\[\e[1;31m\]+\[\e[m\] "
+++ /dev/null
-# initialization for login shells
-
-source ~/.bashrc
+++ /dev/null
-# plomlompom's bashrc for non-login shells
-
-# Fancy colors for ls.
-alias ls="ls --color=auto"
-
-# Use vim as default editor for anything.
-export VISUAL=vim
-export EDITOR=$VISUAL
-
-# Wrapper for weechat to force local config file on it anew on each run.
-alias weechat="~/config/bin/weechat-wrapper.sh"
-
-# Blue prompt with time.
-PS1="\[\e[1;34m\][\\t \\u@\\h \\w]$\[\e[m\] "
-PS2="\[\e[1;34m\]>\[\e[m\] "
-PS3="\[\e[1;34m\]>\[\e[m\] "
-PS4="\[\e[1;34m\]+\[\e[m\] "
--- /dev/null
+# Server-specific .shinit additions.
+
+# Wrapper for weechat to force local config file on it anew on each run.
+alias weechat="~/config/bin/weechat-wrapper.sh"
+++ /dev/null
-# plomlompom's bashrc for non-login shells
-
-# Fancy colors for ls.
-alias ls="ls --color=auto"
-
-# Use vim as default editor for anything.
-export VISUAL=vim
-export EDITOR=$VISUAL
-
-# Blue prompt with time.
-PS1="\[\e[1;32m\][\\t \\u@\\h \\w]$\[\e[m\] "
-PS2="\[\e[1;32m\]>\[\e[m\] "
-PS3="\[\e[1;32m\]>\[\e[m\] "
-PS4="\[\e[1;32m\]+\[\e[m\] "
set -x
+dir_minimal=~/config/dotfiles_minimal
dir_user_minimal=~/config/dotfiles_user_minimal
dir_user_thinkpad=~/config/dotfiles_user_thinkpad
dir_user_server=~/config/dotfiles_user_server
dir_root=~/config/dotfiles_root
homedir=`echo ~`
find ~ -lname $homedir'/config/*' -delete
+for file in `ls $dir_minimal`; do
+ ln -fs $dir_minimal/$file ~/.$file
+done
for file in `ls $dir_user_minimal`; do
ln -fs $dir_user_minimal/$file ~/.$file
done