Re: FVWM: Current directory in xterm title bar

From: Russell <rjshaw_at_iprimus.com.au>
Date: Tue, 22 Oct 2002 11:05:21 +1000

Andy Arbon wrote:
>
> 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.

Prompt strings can also contain cursor movement commands.
You could have an extra prompt string displayed at the top or bottom
of the window, even without using the border. Browsing with google,
i think i've seen that kind of thing, and the background colour of
these strings can be changed which makes it look better.
--
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 - 20:03:38 BST

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