>> Is it possible to change the title/iconname of a xterm-window dynamically
>> to show the name of the process running in the foreground if such one exists
>> or if such one does not exist the current directory ?
>Below is a snippet from a TCL script I use to set the title of each new xterm I
>create. The key is the ESC sequences...
Here's mine...
#!/bin/csh -f
#
# Sets the title bar of an xterm
# (My addition)
if( $?term ) then
if( $term == "xterm" ) then
echo -n "]2;`hostname`:`pwd`"
endif
endif
And I use the following in my .cshrc, which gives me prompts suitable for
both text terminals and X terms:
alias a alias
a ll 'ls -lFa'
a pd pushd
a setprompt 'set prompt="$user_at_$host `dirs` \! > "'
a pushd 'pushd \!:* ; setprompt'
a popd 'popd ; setprompt'
a cd 'cd \!:* ; setprompt'
a telnet 'telnet \!:* ; setprompt'
a rlogin 'rlogin \!:* ; setprompt'
# doesn't work properly on Linux and some other systems
# so, we make the aliases to call setprompt directly
if( $?TERM ) then
if( $TERM == "xterm" || $TERM == "xterms" ) then
unalias setprompt
a setprompt 'set prompt="$user_at_$host \! > " ; /usr/bin/pwdtitle '
if( $?SHELL ) then
if( `basename $SHELL` == "tcsh" ) then
a setprompt 'set prompt="%n_at_%m#%l %h %?%# "; /usr/bin/pwdtitle'
endif
endif
endif
endif
setprompt
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu May 16 1996 - 17:35:54 BST