Re: FVWM: bash PS1 fvwm2 titlebar problem

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 18 May 2001 20:26:42 +0000

On 11 May 2001 21:36:49 +0200, Martin Novak wrote:
>
> 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

I can't reproduce this neither with fvwm-2.2.5 nor fvwm-2.3.32, window
names are successfully changed from xterm without any cd command.

Use FvwmIdent and/or xwininfo to determine whether a window title that you
see is correct.

Regards,
Mikhael.
--
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 18 2001 - 15:27:30 BST

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