FVWM: bash PS1 fvwm2 titlebar problem

From: Martin Novak <wp__at_gmx.de>
Date: Fri, 11 May 2001 21:36:49 +0200

hi,
i'm new here, so hello everybody.

could anyone try to reproduce this behaviour, or give me a hint?

below is the .bash_profile part which defines my PS1.
it works fine, but fvwm seems to have a problem with the titlebar, when a
new xterm is opened. the titlebar simply says 'xterm', until i change to
some directory for the first time. from then on it works properly.
with twm the ps1 definition works without problems here.

thanks in advance
martin novak

info:
system: freebsd 4.3s
bash: 2.05
fvwm: 2.2.5
i've had this behaviour since fbsd 3.x, bash 2.03, fvwm 2.??

.bash_profile part:
...
case $TERM in
    xterm*) TITLEBAR='\[\e]1;\W\a\e]2;\h: ${PWD}\a'
            ;;
    *) TITLEBAR=''
            ;;
esac
function prmpt1
{
    local GREEN="\[\e[1;32m\]"
    local RED="\[\e[1;31m\]"
    local CYAN="\[\e[1;36m\]"
    local BLUE="\[\e[1;34m\]"
    local NOCOL="\[\e[0m\]"
    if awk 'BEGIN {"who am i" | getline;\
    if ((match($6, /(:.+\..+)/)) || ($6 == "")) exit 0; else exit 1 }'
        then local HOSTCOL=$BLUE
        else local HOSTCOL=$CYAN
    fi
    if [ `id -u` -eq 0 ]
        then local USERCOL=$RED
        else local USERCOL=$GREEN
    fi
PS1="${TITLEBAR}\n\
${USERCOL}[\
${HOSTCOL}\h: ${BLUE}"'${PWD}'\
"${USERCOL}]\
\n${BLUE}\$${NOCOL} "
}
prmpt1

-- 
wp__at_gmx.de
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri May 11 2001 - 14:36:31 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:51 BST