From: Vincent Lefevre <vincent@vinc17.org>
To: Clint Adams <clint@zsh.org>
Cc: Juhapekka Tolvanen <juhtolv@st.jyu.fi>,
zsh-users@sunsite.dk, Sven Guckes <guckes@math.fu-berlin.de>,
jw@cs.fau.de, ric@giccs.georgetown.edu
Subject: Re: Titlebar-handling with zsh and screen
Date: Sun, 10 Mar 2002 02:38:23 +0100 [thread overview]
Message-ID: <20020310013822.GA23829@greux.loria.fr> (raw)
In-Reply-To: <20020309051805.GA29385@dman.com>
BTW, for those who are interested, here's my current code for the
terminal title:
In .screenrc:
hardstatus off
hardstatus string "%h%n (%t)"
termcapinfo xterm*|rxvt hs:ts=\E]2;:fs=^G:ds=\E]2;TITLEDISABLED^G
In .zshrc:
zmodload -i zsh/parameter
precmd()
{
psvar[1]=$#jobstates;
if [[ $psvar[1] -eq 0 ]] then
psvar[1]=()
elif [[ $psvar[1] -eq 1 ]] then
psvar[1]="$psvar[1] job"
else
psvar[1]="$psvar[1] jobs"
fi
[[ -n $TTY && $TERM == (xterm*|dtterm|rxvt|screen*) ]] &&
{
print -nP "\e]1;%m:%.\x07"
print -nP "\e]2;%(1v. %1v |.)${WINTITLE:+ $WINTITLE |} %n@%m - %~ | %y"
[[ $TERM == screen* ]] && print -n .
print -n "\x07"
} > $TTY
}
TRAPCLD() { [[ -o interactive && -n $TTY ]] && precmd }
However, there's still a problem when a job terminates at the wrong
place. For instance:
$ sleep 5 &
$ screen
When the sleep terminates, the title will be (incorrectly) updated.
Moreover, I don't understand why the title doesn't come back to its
correct value when I hit the Return key.
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
next prev parent reply other threads:[~2002-03-10 1:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-09 3:12 Juhapekka Tolvanen
2002-03-09 5:12 ` Vincent Lefevre
2002-03-09 5:18 ` Clint Adams
2002-03-09 23:55 ` Vincent Lefevre
2002-03-10 1:38 ` Vincent Lefevre [this message]
2002-03-09 7:23 ` John Beppu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020310013822.GA23829@greux.loria.fr \
--to=vincent@vinc17.org \
--cc=clint@zsh.org \
--cc=guckes@math.fu-berlin.de \
--cc=juhtolv@st.jyu.fi \
--cc=jw@cs.fau.de \
--cc=ric@giccs.georgetown.edu \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).