home · contact · privacy
Enhance Bookworm setup.
[config] / bookworm / home_files / minimal / .bashrc
1 # Settings for interactive shells.
2
3 # Fancy colors for ls.
4 alias ls="ls --color=auto"
5
6 # Other helpful aliases
7 alias sshauth='eval $(ssh-agent) && ssh-add'
8 # alias xrandrbig='xrandr --output LVDS-1 --off'
9
10 # Use vim as default editor for anything.
11 export VISUAL=vim
12 export EDITOR=$VISUAL
13
14 # Colored prompt with username, hostname, date/time, directory.
15 colornumber=7 # Default to white if no color set via colornumber dotfile.
16 colornumber_file=~/.shell_prompt_color
17 if [ -f $colornumber_file ]; then
18     colornumber=`cat $colornumber_file`
19 fi
20 tput_color="$(tput setaf $colornumber)$(tput bold)"
21 tput_reset="$(tput sgr0)"
22 # Bash confuses the line length when not told to not count escape sequences.
23 if [ ! "$BASH" = "" ]; then
24     tput_color="\[$tput_color\]"
25     tput_reset="\[$tput_reset\]"
26 fi
27 PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ $tput_reset"
28 PS2="${tput_color}> $tput_reset"
29 PS3="${tput_color}select: $tput_reset"
30 PS4="${tput_color}+ $tput_reset"