From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 590 invoked from network); 23 Oct 2000 13:45:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Oct 2000 13:45:31 -0000 Received: (qmail 5415 invoked by alias); 23 Oct 2000 13:45:13 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3467 Received: (qmail 5408 invoked from network); 23 Oct 2000 13:45:12 -0000 Date: Mon, 23 Oct 2000 16:45:10 +0300 From: Juhapekka Tolvanen To: zsh-user mailing list Subject: Re: Whatta fsck is this? Message-ID: <20001023164510.A2947@verso.st.jyu.fi> References: <20001023082922.A25651@verso.st.jyu.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2i In-Reply-To: <20001023082922.A25651@verso.st.jyu.fi>; from juhtolv@st.jyu.fi on Mon, Oct 23, 2000 at 08:29:46AM +0300 Organization: =?iso-8859-1?Q?Overhovel_of_Jyv=E4skyl=E4?= X-URL: http://www.jyu.fi/~juhtolv/ X-Mailer-URL: http://www.mutt.org/ X-Editor: Vim http://www.vim.org/ X-Operating-System: Linux 2.2.17pre16 on an i586 On Mon, 23 Oct 2000, +08:29:46 EEST (UTC +0300), Juhapekka Tolvanen pressed these keys: > > http://www.zsh.org/mla/users/2000/msg00570.html > > >Juhapekka Tolvanen wrote: > > writetitle() > { > export TITLETEXT="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d | ${COLUMNS}x${LINES} | %l" > } > > writeexectitle() > { > export EXECTEXT1="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d : " > export EXECTEXT2="$*" > } > > # TERMINAL TYPES > > case "$TERM" in > > *xterm*|rxvt|(dt|k|E)term) > precmd() > { > writetitle > print -Pn "\e]0;${TITLETEXT}\a" > } > > preexec() > { > writeexectitle $* > print -Pn '\e]0;' > print -Pn "${EXECTEXT1}" > print -rn "${EXECTEXT2}" > print -Pn '\a' > } > ;; > > And so on... Argh! It was b0rken! That does not fscking work, when I am rewt. # {{{ Am I root? if (( EUID == 0 )) then # export ROOTTEXT='=*[ROOT ZSH]*=' export ROOTTEXT='-=*[ROOT ZSH]*=-' # ROOTTEXT='' export ROOTPROMPTADD=' ' export ROOTTITLEADD=' | ' # ADD THIS TO PROMPT: # %S$ROOTTEXT%s$ROOTPROMPTADD # AND THIS TO TITLE: # $ROOTTEXT$ROOTTITLEADD #PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" #export PATH else ROOTTEXT='' ROOTPROMPTADD='' ROOTTITLEADD='' fi (MAJOR CLIP) writeexectitle() { # export EXECTEXT0="${ROOTTEXT}${ROOTTITLEADD}" # export EXECTEXT1="%n@%m:%d : " export EXECTEXT1="${ROOTTEXT}${ROOTTITLEADD}%n@%m:%d : " export EXECTEXT2="$*" } # TERMINAL TYPES case "$TERM" in *xterm*|rxvt|(dt|k|E)term) precmd() { writetitle print -Pn "\e]0;${TITLETEXT}\a" } preexec() { writeexectitle $* # print -Pn '\e]0;' print -Pn '\e]0;'"${EXECTEXT1}" print -rn "${EXECTEXT2}" print -Pn '\a' } ;; (MAJOR CLIP) In original version that hyphen in the beginning of "-=*[ROOT ZSH]*=-" makes print-command think that "-=" is yet another option for it. > I'll upload that config here ASAP: > > http://www.jyu.fi/~juhtolv/configs/shellrc/ Please, wait few hours and then re-download! BTW, If you have access to Unix b0x0rs with these more or less delicious flavours of Unix and these terminal-emulators and terminal types, please test my configurations, both as luser and rewt: OS, Terminal emulator and $TERM : IRIX: - wsh - xwsh - winterm - iris-ansi AIX - aixterm - aixterm HP-UX - HPterm - hpterm Especially try these: - What you see in titlebar of terminal window and title of icon? - How aforementioned things change, if you give for exaple this command?: ls ; sleep 20 Additional information is here: http://www.giccs.georgetown.edu/~ric/howto/Xterm-Title/ > P.S: I don't subscribe to these lists, but I am smart enough to read > Mailing List Archive and you can Cc: to me, i you want. -- Juhapekka "naula" Tolvanen * * * U of Jyväskylä * * * juhtolv@st.jyu.fi http://www.cc.jyu.fi/~juhtolv/index.html * * "STRAIGHT BUT NOT NARROW!" ----------------------------------------------------------------------- "Rakasta mua, tai vihaa mua. Hei, kuinka vaan. Kai sillä sitten voit jotain uutta saavuttaa. Kai mä ansaitsen uuden tilaisuuden. Kai mä ansaitsen. Hei, mä tiedän sen. Olen liikaa. Minä olen liikaa." Apulanta