Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fill="--- "
- reset_style='\[\033[00m\]'
- if [ -z "$VIM" ];
- then status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
- else status_style=$reset_style'\[\033[0;90;107m\]'
- fi
- prompt_style=$reset_style
- command_style=$reset_style'\[\033[1;29m\]' # bold black
- OLD_PS1="$PS1"
- PS1="$status_style"'$fill \t\n'"$prompt_style$OLD_PS1$command_style"
- trap 'echo -ne "\e[0m"' DEBUG
- function prompt_command {
- let fillsize=${COLUMNS}-9
- fill=""
- while [ "$fillsize" -gt "0" ]
- do
- fill="-${fill}" # fill with underscores to work on
- let fillsize=${fillsize}-1
- done
- case "$TERM" in
- xterm*|rxvt*)
- bname=`basename "${PWD/$HOME/~}"`
- echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
- ;;
- *)
- ;;
- esac
- }
- PROMPT_COMMAND=prompt_command
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement