Re: FVWM: Current directory in xterm title bar

From: Denis Perelyubskiy <denisp_at_CS.UCLA.EDU>
Date: Mon, 21 Oct 2002 15:26:11 -0700

Andy,

How interesting. I was trying to do a lastcommand thing at
some point. But I could come up with nothing better then
sync my history with current and then parse that. But your
solution seems like it'd be much faster as it doe snot sync
the history...

Is this slow, or does it work well? If so, I'll steal this
from you :-)

thanks.

denis

  * <andy_at_andrewarbon.co.uk> [21-Oct-02 10:39 -0700]:
>
>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.


denis

-- 
// mailto: Denis Perelyubskiy <denisp_at_CS.UCLA.EDU>
// icq   : 12359698
// PGP   : http://www.cs.ucla.edu/~denisp/files/pgp.asc
--
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 - 17:27:53 BST

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