From: Christian Heller Date: Sun, 7 Apr 2019 18:00:20 +0000 (+0200) Subject: To Buster EeePC setup, add bashrc. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/copy_free?a=commitdiff_plain;h=4c4f666141b387841778ff816c9eec3da87b8a77;p=config To Buster EeePC setup, add bashrc. --- diff --git a/buster/apt-mark/eeepc b/buster/apt-mark/eeepc index 5181ac4..5defcf0 100644 --- a/buster/apt-mark/eeepc +++ b/buster/apt-mark/eeepc @@ -30,6 +30,7 @@ firefox-esr # for xterm and browser unicode display ttf-unifont # also useful +vim sudo less man-db diff --git a/buster/home_files/.bashrc b/buster/home_files/.bashrc new file mode 100644 index 0000000..85c2e22 --- /dev/null +++ b/buster/home_files/.bashrc @@ -0,0 +1,26 @@ +# 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=~/.shell_prompt_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. +if [ ! "$BASH" = "" ]; 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" diff --git a/buster/setup_scripts/setup_eeepc.sh b/buster/setup_scripts/setup_eeepc.sh index f7710b5..289a1a5 100755 --- a/buster/setup_scripts/setup_eeepc.sh +++ b/buster/setup_scripts/setup_eeepc.sh @@ -19,4 +19,5 @@ if [ ! -d "/home/plom" ]; then usermod -a -G sudo plom su -c "cd && git clone https://plomlompom.com/repos/clone/config" plom su -c "~/config/buster/setup_scripts/copy_dirtree.sh ~/config/buster/home_files ~ eeepc" plom + su -c "echo 2 > ~/.shell_prompt_color" fi