Re: FVWM: Current directory in xterm title bar

From: Andy Arbon <andy_at_andrewarbon.co.uk>
Date: Mon, 21 Oct 2002 18:32:26 +0100

Hello,

This is a section from my .bashrc:
(excuse messy code - it's one of those 'under constant tweaking' things)

-------------------
function lastcommand() {
     TEST=`history 2 2>&1|tail -n1|sed -e "s/\ *[0-9]*\ *//"`
     TEST2="(`whoami`_at_`hostname|cut -d'.' -f1`): $TEST"
     echo -n "$TEST2 [`pwd`]"
     return;
}

export PROMPT_COMMAND='echo -en "\033]0;`lastcommand`\007"';
===============

This gives you a title bar that updates after each command is executed
and shows :
(<username>_at_<hostname>): <last executed command> [<current directory]

Looks like it should be a mess, but it's actually perfectly usable and
makes finding the correct xterm in the windowlist much easier.

If you make any useful improvements to the idea I'd be interested to
know about them.

Cheers,

Andy

>>>Hi all,
>>>
>>>In .fvwm2rc, when an xterm is opened from a
>>>pop-up menu, i want to show the current
>>>directory in the xterm title bar. How can i
>>>do that?
>>
> --

-- 
Real Men don't make backups. They upload it via ftp and let the world
mirror it. -- Linus Torvalds
--
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 Mon Oct 21 2002 - 12:37:53 BST

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