From 293a5c0960425b83d95ee6584e56e557b8b5e781 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 25 Oct 2019 21:17:18 +0100 Subject: [PATCH] Make titles larger red background, white text. Also add a banner function which can be used by other code for the same effect. Unfortunately we cannot reuse that function to display the title. --- 2019-kvm-forum/bashrc | 5 +++-- 2019-kvm-forum/functions | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/2019-kvm-forum/bashrc b/2019-kvm-forum/bashrc index 36e9c0a..a52a5e9 100644 --- a/2019-kvm-forum/bashrc +++ b/2019-kvm-forum/bashrc @@ -5,7 +5,7 @@ if [ -f /etc/profile.d/colorls.sh ]; then . /etc/profile.d/colorls.sh; fi # Fancy prompt colours (see # https://wiki.archlinux.org/index.php/Color_Bash_Prompt) -titlecol=$'\e[1;30;47m' ;# colour for the title +titlecol=$'\e[1;37;41m' ;# colour for the title promptcol=$'\e[0;32m' ;# colour for the prompt commandcol=$'\e[1;31m' ;# colour for the typed command outputcol=$'\e[0m' ;# colour for command output @@ -17,4 +17,5 @@ trap 'echo -ne "$outputcol"' DEBUG # Load key bindings (if any). bind -f $talkdir/bindings -printf %s\\n "$titlecol$title$outputcol" +# Same as the banner function, but we cannot reuse it. +printf "%s %s %s\\n" $titlecol "$title" $outputcol diff --git a/2019-kvm-forum/functions b/2019-kvm-forum/functions index 99c033b..94948e2 100644 --- a/2019-kvm-forum/functions +++ b/2019-kvm-forum/functions @@ -39,3 +39,8 @@ terminal () chmod -w $HISTFILE /bin/bash --rcfile $talkdir/bashrc "$@" } + +banner () +{ + printf "%s %s %s\\n" $'\e[1;37;41m' "$1" $'\e[0m' +} -- 1.8.3.1