Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Display current action in title bar
@ 2010-06-14 13:47 Paul Jones
  2010-06-15  9:56 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Jones @ 2010-06-14 13:47 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Paul Jones <paul@pauljones.id.au>
---
 package/Makefile.package.in |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index a2720d7..327ab92 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -48,8 +48,9 @@ INFLATE.tbz2 = $(BZCAT)
 INFLATE.tgz  = $(ZCAT)
 INFLATE.tar  = cat
 
-# MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+# MESSAGE Macro -- display a message in bold type and in the title bar
+MESSAGE  = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" \
+		&& echo -en "\033]2; $($(PKG)_NAME) $($(PKG)_VERSION) $(1) \007"
 TERM_BOLD := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Display current action in title bar
  2010-06-14 13:47 [Buildroot] [PATCH] Display current action in title bar Paul Jones
@ 2010-06-15  9:56 ` Thomas Petazzoni
  2010-06-15 10:20   ` Peter Korsgaard
  2010-06-15 10:33   ` Paul Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2010-06-15  9:56 UTC (permalink / raw)
  To: buildroot

On Mon, 14 Jun 2010 23:47:15 +1000
Paul Jones <paul@pauljones.id.au> wrote:

> -# MESSAGE Macro -- display a message in bold type
> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
> +# MESSAGE Macro -- display a message in bold type and in the title bar
> +MESSAGE  = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" \
> +		&& echo -en "\033]2; $($(PKG)_NAME) $($(PKG)_VERSION) $(1) \007"

I've tried this here in my xfterm (XFCE terminal) and it doesn't do
anything. Is my terminal emulator too crappy ?

Anyway, I'm not sure I'd like to see Buildroot hijack the title bar of
my terminal emulator. Or maybe I'm missing the point of your patch ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Display current action in title bar
  2010-06-15  9:56 ` Thomas Petazzoni
@ 2010-06-15 10:20   ` Peter Korsgaard
  2010-06-15 10:33   ` Paul Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2010-06-15 10:20 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> On Mon, 14 Jun 2010 23:47:15 +1000
 Thomas> Paul Jones <paul@pauljones.id.au> wrote:

 >> -# MESSAGE Macro -- display a message in bold type
 >> -MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
 >> +# MESSAGE Macro -- display a message in bold type and in the title bar
 >> +MESSAGE  = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" \
 >> +		&& echo -en "\033]2; $($(PKG)_NAME) $($(PKG)_VERSION) $(1) \007"

 Thomas> I've tried this here in my xfterm (XFCE terminal) and it doesn't do
 Thomas> anything. Is my terminal emulator too crappy ?

 Thomas> Anyway, I'm not sure I'd like to see Buildroot hijack the title bar of
 Thomas> my terminal emulator. Or maybe I'm missing the point of your patch ?

I made a similar patch back in February:

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index fbd7f69..c40f83f 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -34,7 +34,7 @@ INFLATE.tgz = $(ZCAT)
 INFLATE.tar = cat
 
 # MESSAGE Macro -- display a message in bold type
-MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+MESSAGE = echo -e "\033]0;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
 TERM_BOLD := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)

It's sometimes handy to get an idea of what BR is doing while tons of
text scrolls over the screen, but I'm also not convinced we should do it
by default.

-- 
Bye, Peter Korsgaard

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Display current action in title bar
  2010-06-15  9:56 ` Thomas Petazzoni
  2010-06-15 10:20   ` Peter Korsgaard
@ 2010-06-15 10:33   ` Paul Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Jones @ 2010-06-15 10:33 UTC (permalink / raw)
  To: buildroot

> -----Original Message-----
> From: buildroot-bounces at busybox.net [mailto:buildroot-
> bounces at busybox.net] On Behalf Of Thomas Petazzoni
> Sent: Tuesday, 15 June 2010 7:56 PM
> To: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH] Display current action in title bar
> 
> On Mon, 14 Jun 2010 23:47:15 +1000
> Paul Jones <paul@pauljones.id.au> wrote:
> 
> > -# MESSAGE Macro -- display a message in bold type -MESSAGE = echo
> > "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION)
> $(1)$(TERM_RESET)"
> > +# MESSAGE Macro -- display a message in bold type and in the title
> > +bar MESSAGE  = echo "$(TERM_BOLD)>>> $($(PKG)_NAME)
> $($(PKG)_VERSION) $(1)$(TERM_RESET)" \
> > +		&& echo -en "\033]2; $($(PKG)_NAME) $($(PKG)_VERSION)
> $(1) \007"
> 
> I've tried this here in my xfterm (XFCE terminal) and it doesn't do
anything. Is
> my terminal emulator too crappy ?
> 
> Anyway, I'm not sure I'd like to see Buildroot hijack the title bar of my
> terminal emulator. Or maybe I'm missing the point of your patch ?

It works using the Gnome terminal and Putty. I'll try it on some others.
Since the terminal title is usually set by the PS1 variable that means that
as soon as builtroot stops running it will return to normal. The Gentoo
build system does the same thing and it is quite handy to see what's
happening.
 

Paul.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-15 10:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-14 13:47 [Buildroot] [PATCH] Display current action in title bar Paul Jones
2010-06-15  9:56 ` Thomas Petazzoni
2010-06-15 10:20   ` Peter Korsgaard
2010-06-15 10:33   ` Paul Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox