[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HPterm titlebar

From: Phil!Gregory
Subject: Re: HPterm titlebar
Date: Mon, 1 Aug 2005 19:54:01 -0400
User-agent: Mutt/1.5.9i

* address@hidden <address@hidden> [2005-08-01 16:40 -0400]:
> And an HP faq was helpful in getting me info on how to shell script the
> hpterm titlebar change.
> However, I'd like to change the shellscript to something that the screenrc
> can process, but I don't understand the escape characters.

Unfortunately, it's not terribly easy to do.  It appears that the escape
sequence for hpterm embeds the length of the string that's to go into the
title.  The usual xterm titlebar hack, however, pretends that the title
bar is a terminal status bar, and termcap and terminfo expect that there
are fixed strings for entering and leaving the status bar area.

There are two approaches I can think of that will work.  One is simply to
hardcode the string.  If your username is always, say, "judd", than you
could just use:

  termcapinfo hpterm 'hs:ts=\E&f0k11DHello judd!:fs=:ds=\E&f0k11DHello judd!'
  defhstatus "It doesn't matter what you put here.  This string is ignored."
  hardstatus off

The other approach would be to use the backtick command to generate the
entire escape sequence.  Have a shell script that looks something like

  LENGTH=`echo "$ARGS" |wc -c`
  LEN=`expr $LENGTH - 1`
  echo "\033&f0k${LEN}D$ARGS\c"

Let's say that script is named hpterm-title.  You would then put this in
your .screenrc:

  backtick 31 86400 0 hpterm-title $LOGNAME
  termcapinfo dtterm 'hs:ts=:fs=:ds=\E&f0k0D'
  defhstatus %31`
  hardstatus off

-- contrarian of the first order... /
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
Everything is stupid. Which stupid thing are you referring to?
                       -- Eric Wiseblatt
---- --- --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]