6600: Slightly nicer terminal window.
[libguestfs-talks.git] / 2019-kvm-forum / bashrc
1 # -*- shell-script -*-
2
3 # Colour ls.
4 if [ -f /etc/profile.d/colorls.sh ]; then . /etc/profile.d/colorls.sh; fi
5
6 # Fancy prompt colours (see
7 # https://wiki.archlinux.org/index.php/Color_Bash_Prompt)
8 titlecol=$'\e[1;37;41m'    ;# colour for the title
9 promptcol=$'\e[0;32m'      ;# colour for the prompt
10 commandcol=$'\e[1;31m'     ;# colour for the typed command
11 outputcol=$'\e[0m'         ;# colour for command output
12
13 export PS1="\n\[$promptcol\]\$ \[$commandcol\]"
14
15 trap 'echo -ne "$outputcol"' DEBUG
16
17 # Load key bindings (if any).
18 bind -f $talkdir/bindings
19
20 # Same as the banner function, but we cannot reuse it.
21 printf "\e]0;$title\a"
22 printf "%s   %s   %s\\n" $titlecol "$title" $outputcol