diff mbox

infra: display current task as title of the term window

Message ID 1375822004-22591-1-git-send-email-francois.perrad@gadz.org
State Rejected
Headers show

Commit Message

Francois Perrad Aug. 6, 2013, 8:46 p.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/pkg-utils.mk |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas De Schampheleire Aug. 7, 2013, 6:44 a.m. UTC | #1
Hi François,

On Tue, Aug 6, 2013 at 10:46 PM, Francois Perrad <fperrad@gmail.com> wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/pkg-utils.mk |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 15db096..8572cb1 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -64,7 +64,8 @@ INFLATE.xz   = $(XZCAT)
>  INFLATE.tar  = cat
>
>  # MESSAGE Macro -- display a message in bold type
> -MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
> +MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" && \
> +              echo -e "\033]2;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
>  TERM_BOLD  := $(shell tput smso)
>  TERM_RESET := $(shell tput rmso)

Although I like the idea, it does not work for me. I'm running Linux
Mint, with a Konsole terminal. The above does nothing at all. I also
tried manually:

echo -ne "\033]0;something\007"

but it doesn't change a thing.
It does work in gnome-terminal. I haven't tested in other situations.

Could you have a look at Konsole?

I know that Gentoo has this feature for its portage package
installation/compilation tool. When you run 'emerge', the titles are
constantly updated with the package that is being handled, also in
Konsole. You may be able to find out what the 'right way' is based on
their sources.

Thanks,
Thomas
Carsten Schoenert Aug. 7, 2013, 8:15 a.m. UTC | #2
Hello Thomas,

Am 07.08.2013 08:44, schrieb Thomas De Schampheleire:
> echo -ne "\033]0;something\007"
> 
> but it doesn't change a thing.

I think the quoting and controling syntax is wrong. The following string
works here fine in a Gnome terminal.

> echo -ne "\033[2msomething\033[0m other text\n"

Or with a underline and in green.

> echo -ne "\033[4;32msomething\033[0m other text\n"

You need to set up the starting thing with '\033["$foo-color"' and
finally switch at the end to the to the default back '\033[0m'

More info around colors in the Bash can be found on
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
But that's only for the Bash!

Hope that helps.

Regards
Carsten
Thomas De Schampheleire Aug. 7, 2013, 8:20 a.m. UTC | #3
Hi Carsten,

On Wed, Aug 7, 2013 at 10:15 AM, Carsten Schoenert
<c.schoenert@gmail.com> wrote:
> Hello Thomas,
>
> Am 07.08.2013 08:44, schrieb Thomas De Schampheleire:
>> echo -ne "\033]0;something\007"
>>
>> but it doesn't change a thing.
>
> I think the quoting and controling syntax is wrong. The following string
> works here fine in a Gnome terminal.
>
>> echo -ne "\033[2msomething\033[0m other text\n"
>
> Or with a underline and in green.
>
>> echo -ne "\033[4;32msomething\033[0m other text\n"
>
> You need to set up the starting thing with '\033["$foo-color"' and
> finally switch at the end to the to the default back '\033[0m'
>
> More info around colors in the Bash can be found on
> http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
> But that's only for the Bash!

The change François is suggesting is for the terminal title window, it
does not change anything about coloring.
The above commands you gave do not change anything in the title bar
for me, nor in Konsole, nor in gnome-terminal. The second command does
show the green underlined text in both terminals, but as said the
title bar is unchanged.

Best regards,
Thomas
Francois Perrad Aug. 7, 2013, 8:45 a.m. UTC | #4
2013/8/7 Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>:
> Hi François,
>
> On Tue, Aug 6, 2013 at 10:46 PM, Francois Perrad <fperrad@gmail.com> wrote:
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>  package/pkg-utils.mk |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
>> index 15db096..8572cb1 100644
>> --- a/package/pkg-utils.mk
>> +++ b/package/pkg-utils.mk
>> @@ -64,7 +64,8 @@ INFLATE.xz   = $(XZCAT)
>>  INFLATE.tar  = cat
>>
>>  # MESSAGE Macro -- display a message in bold type
>> -MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
>> +MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" && \
>> +              echo -e "\033]2;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
>>  TERM_BOLD  := $(shell tput smso)
>>  TERM_RESET := $(shell tput rmso)
>
> Although I like the idea, it does not work for me. I'm running Linux
> Mint, with a Konsole terminal. The above does nothing at all. I also
> tried manually:
>
> echo -ne "\033]0;something\007"

Thomas,

at the end of the command, the initial title is restored, so try
something like :
$ echo -e "\033]2;Foo\007" && wait

François

>
> but it doesn't change a thing.
> It does work in gnome-terminal. I haven't tested in other situations.
>
> Could you have a look at Konsole?
>
> I know that Gentoo has this feature for its portage package
> installation/compilation tool. When you run 'emerge', the titles are
> constantly updated with the package that is being handled, also in
> Konsole. You may be able to find out what the 'right way' is based on
> their sources.
>
> Thanks,
> Thomas
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas De Schampheleire Aug. 7, 2013, 9:11 a.m. UTC | #5
On Wed, Aug 7, 2013 at 10:45 AM, François Perrad
<francois.perrad@gadz.org> wrote:
> Thomas,
>
> at the end of the command, the initial title is restored, so try
> something like :
> $ echo -e "\033]2;Foo\007" && wait
>

This also doesn't change anything for me.
Carsten Schoenert Aug. 7, 2013, 10:56 a.m. UTC | #6
Hello Thomas,

Am 07.08.2013 10:20, schrieb Thomas De Schampheleire:
> The change François is suggesting is for the terminal title window, it
> does not change anything about coloring.

Ah yes, I misunderstand. Sorry.

> The above commands you gave do not change anything in the title bar
> for me, nor in Konsole, nor in gnome-terminal. The second command does
> show the green underlined text in both terminals, but as said the
> title bar is unchanged.

So I take a look at the titel in the console (I didn't before), works
here. I can set the name to what ever I want. Maybe you have unset some
variables or so? But I don't think it's depend on this.

> $ env | grep  "SHELL\|TERM"
> TERM=xterm
> SHELL=/bin/bash
> COLORTERM=gnome-terminal

Regards
Carsten
Thomas De Schampheleire Aug. 7, 2013, 11:21 a.m. UTC | #7
On Wed, Aug 7, 2013 at 12:56 PM, Carsten Schoenert
<c.schoenert@gmail.com> wrote:
> env | grep  "SHELL\|TERM"

In my case:

SHELL=/bin/bash
TERM=xterm
Danomi Manchego Aug. 7, 2013, 2:11 p.m. UTC | #8
On Wed, Aug 7, 2013 at 5:11 AM, Thomas De Schampheleire <
patrickdepinguin+buildroot@gmail.com> wrote:

> On Wed, Aug 7, 2013 at 10:45 AM, François Perrad
> <francois.perrad@gadz.org> wrote:
> > Thomas,
> >
> > at the end of the command, the initial title is restored, so try
> > something like :
> > $ echo -e "\033]2;Foo\007" && wait
> >
>
> This also doesn't change anything for me.


For what it's worth - It didn't appear to do anything on my Ubuntu 12.04 -
because the "wait" ended immediately.  But if I replace the "wait" with a
"sleep", then the window title persists for the entire sleep time.  So, for
example, this worked for me:

echo -e "\033]2;Buildroot menuconfig\007" && make menuconfig

(But only if I hadn't set a Title already from the window's drop-down menu.)
Arnout Vandecappelle Aug. 13, 2013, 5:36 a.m. UTC | #9
On 07/08/13 08:44, Thomas De Schampheleire wrote:
> Hi François,
>
> On Tue, Aug 6, 2013 at 10:46 PM, Francois Perrad <fperrad@gmail.com> wrote:
>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>> ---
>>   package/pkg-utils.mk |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
>> index 15db096..8572cb1 100644
>> --- a/package/pkg-utils.mk
>> +++ b/package/pkg-utils.mk
>> @@ -64,7 +64,8 @@ INFLATE.xz   = $(XZCAT)
>>   INFLATE.tar  = cat
>>
>>   # MESSAGE Macro -- display a message in bold type
>> -MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
>> +MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" && \
>> +              echo -e "\033]2;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
>>   TERM_BOLD  := $(shell tput smso)
>>   TERM_RESET := $(shell tput rmso)
>
> Although I like the idea, it does not work for me. I'm running Linux
> Mint, with a Konsole terminal. The above does nothing at all. I also
> tried manually:
>
> echo -ne "\033]0;something\007"
>
> but it doesn't change a thing.
> It does work in gnome-terminal. I haven't tested in other situations.
>
> Could you have a look at Konsole?
>
> I know that Gentoo has this feature for its portage package
> installation/compilation tool. When you run 'emerge', the titles are
> constantly updated with the package that is being handled, also in
> Konsole. You may be able to find out what the 'right way' is based on
> their sources.

  Are you sure this works for you with emerge? I RTFM'ed it and according 
to the konsole manual, you have to add '%w' to the tab title string to 
get the string set by the shell. Perhaps Gentoo simply sets the default 
tab title string to something including %w.

  Regards,
  Arnout
Thomas De Schampheleire Aug. 18, 2013, 8:21 a.m. UTC | #10
On Tue, Aug 13, 2013 at 7:36 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 07/08/13 08:44, Thomas De Schampheleire wrote:
>>

>> I know that Gentoo has this feature for its portage package
>> installation/compilation tool. When you run 'emerge', the titles are
>> constantly updated with the package that is being handled, also in
>> Konsole. You may be able to find out what the 'right way' is based on
>> their sources.
>
>
>  Are you sure this works for you with emerge? I RTFM'ed it and according to
> the konsole manual, you have to add '%w' to the tab title string to get the
> string set by the shell. Perhaps Gentoo simply sets the default tab title
> string to something including %w.
>


It does work for emerge, but it seems you are right: the default tab
title in Gentoo is set to %w (I didn't set it explicitly). I tried
Francois' patch on a non-gentoo system before (didn't work for
Konsole) but after explicitly setting %w in the tab title it also
works there. So that issue is cleared out.

However, while testing again, I noticed an annoyance: if the build
process stops prematurely, for example because the build fails or the
user interrupts it, the last tab title remains. I would much prefer
that we can cleanly restore this no matter how buildroot/make stops.

Best regards,
Thomas
Francois Perrad Aug. 18, 2013, 1:15 p.m. UTC | #11
2013/8/13 Arnout Vandecappelle <arnout@mind.be>:
> On 07/08/13 08:44, Thomas De Schampheleire wrote:
>>
>> Hi François,
>>
>> On Tue, Aug 6, 2013 at 10:46 PM, Francois Perrad <fperrad@gmail.com>
>> wrote:
>>>
>>> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
>>> ---
>>>   package/pkg-utils.mk |    3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
>>> index 15db096..8572cb1 100644
>>> --- a/package/pkg-utils.mk
>>> +++ b/package/pkg-utils.mk
>>> @@ -64,7 +64,8 @@ INFLATE.xz   = $(XZCAT)
>>>   INFLATE.tar  = cat
>>>
>>>   # MESSAGE Macro -- display a message in bold type
>>> -MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION)
>>> $(1)$(TERM_RESET)"
>>> +MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION)
>>> $(1)$(TERM_RESET)" && \
>>> +              echo -e "\033]2;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
>>>   TERM_BOLD  := $(shell tput smso)
>>>   TERM_RESET := $(shell tput rmso)
>>
>>
>> Although I like the idea, it does not work for me. I'm running Linux
>> Mint, with a Konsole terminal. The above does nothing at all. I also
>> tried manually:
>>
>> echo -ne "\033]0;something\007"
>>
>> but it doesn't change a thing.
>> It does work in gnome-terminal. I haven't tested in other situations.
>>
>> Could you have a look at Konsole?
>>
>> I know that Gentoo has this feature for its portage package
>> installation/compilation tool. When you run 'emerge', the titles are
>> constantly updated with the package that is being handled, also in
>> Konsole. You may be able to find out what the 'right way' is based on
>> their sources.
>
>
>  Are you sure this works for you with emerge? I RTFM'ed it and according to
> the konsole manual, you have to add '%w' to the tab title string to get the
> string set by the shell. Perhaps Gentoo simply sets the default tab title
> string to something including %w.
>

I found the same tip for Konsole, see
http://stackoverflow.com/questions/5373253/how-can-one-put-the-output-of-a-command-into-a-konsole-title-bar
So, the patch must work everywhere `echo $TERM` returns 'xterm'.

François

Note : minor improvement in the patch, replace `echo -e` by `echo -ne`

>  Regards,
>  Arnout
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Arnout Vandecappelle Aug. 19, 2013, 4:19 p.m. UTC | #12
On 18/08/13 10:21, Thomas De Schampheleire wrote:
> On Tue, Aug 13, 2013 at 7:36 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> On 07/08/13 08:44, Thomas De Schampheleire wrote:
>>>
>
>>> I know that Gentoo has this feature for its portage package
>>> installation/compilation tool. When you run 'emerge', the titles are
>>> constantly updated with the package that is being handled, also in
>>> Konsole. You may be able to find out what the 'right way' is based on
>>> their sources.
>>
>>
>>   Are you sure this works for you with emerge? I RTFM'ed it and according to
>> the konsole manual, you have to add '%w' to the tab title string to get the
>> string set by the shell. Perhaps Gentoo simply sets the default tab title
>> string to something including %w.
>>
>
>
> It does work for emerge, but it seems you are right: the default tab
> title in Gentoo is set to %w (I didn't set it explicitly). I tried
> Francois' patch on a non-gentoo system before (didn't work for
> Konsole) but after explicitly setting %w in the tab title it also
> works there. So that issue is cleared out.
>
> However, while testing again, I noticed an annoyance: if the build
> process stops prematurely, for example because the build fails or the
> user interrupts it, the last tab title remains. I would much prefer
> that we can cleanly restore this no matter how buildroot/make stops.

  Won't that be the case regardless of whether the build fails or succeeds?

  I think this patch is only really suitable for people who have 
something similar in their PS1. Otherwise it will just mess up your 
window title.

  Also, it should only be done if $TERM == xterm, otherwise you get 
annoying stuff when running buildroot from a text console. And in fact, 
the same is true of the colouring itself, so we don't get these annoying 
escape characters in log files and continuous integration web interfaces.

  Regards,
  Arnout
Thomas De Schampheleire Aug. 19, 2013, 6:49 p.m. UTC | #13
Op 19-aug.-2013 19:09 schreef "Arnout Vandecappelle" <arnout@mind.be> het
volgende:
>
> On 18/08/13 10:21, Thomas De Schampheleire wrote:
>>
>> On Tue, Aug 13, 2013 at 7:36 AM, Arnout Vandecappelle <arnout@mind.be>
wrote:
>>>
>>> On 07/08/13 08:44, Thomas De Schampheleire wrote:
>>>>
>>>>
>>
>>>> I know that Gentoo has this feature for its portage package
>>>> installation/compilation tool. When you run 'emerge', the titles are
>>>> constantly updated with the package that is being handled, also in
>>>> Konsole. You may be able to find out what the 'right way' is based on
>>>> their sources.
>>>
>>>
>>>
>>>   Are you sure this works for you with emerge? I RTFM'ed it and
according to
>>> the konsole manual, you have to add '%w' to the tab title string to get
the
>>> string set by the shell. Perhaps Gentoo simply sets the default tab
title
>>> string to something including %w.
>>>
>>
>>
>> It does work for emerge, but it seems you are right: the default tab
>> title in Gentoo is set to %w (I didn't set it explicitly). I tried
>> Francois' patch on a non-gentoo system before (didn't work for
>> Konsole) but after explicitly setting %w in the tab title it also
>> works there. So that issue is cleared out.
>>
>> However, while testing again, I noticed an annoyance: if the build
>> process stops prematurely, for example because the build fails or the
>> user interrupts it, the last tab title remains. I would much prefer
>> that we can cleanly restore this no matter how buildroot/make stops.
>
>
>  Won't that be the case regardless of whether the build fails or succeeds?

Currently it is indeed, but that could easily be fixed by adding an extra
such print at the end.

>
>  I think this patch is only really suitable for people who have something
similar in their PS1. Otherwise it will just mess up your window title.
>
>  Also, it should only be done if $TERM == xterm, otherwise you get
annoying stuff when running buildroot from a text console. And in fact, the
same is true of the colouring itself, so we don't get these annoying escape
characters in log files and continuous integration web interfaces.

Agreed.

Best regards,
Thomas
Arnout Vandecappelle Aug. 20, 2013, 10:32 p.m. UTC | #14
On 19/08/13 20:49, Thomas De Schampheleire wrote:
[snip]
>  >> However, while testing again, I noticed an annoyance: if the build
>  >> process stops prematurely, for example because the build fails or the
>  >> user interrupts it, the last tab title remains. I would much prefer
>  >> that we can cleanly restore this no matter how buildroot/make stops.
>  >
>  >
>  >  Won't that be the case regardless of whether the build fails or succeeds?
>
> Currently it is indeed, but that could easily be fixed by adding an extra
> such print at the end.

  A print of what? An empty string? Then your window won't have a title 
anymore... There is no way to save the previous window title, so I really 
think that if PS1 doesn't set the window title, then buildroot shouldn't 
either.

  Regards,
  Arnout


>
>  >
>  >  I think this patch is only really suitable for people who have
> something similar in their PS1. Otherwise it will just mess up your
> window title.
>  >
>  >  Also, it should only be done if $TERM == xterm, otherwise you get
> annoying stuff when running buildroot from a text console. And in fact,
> the same is true of the colouring itself, so we don't get these annoying
> escape characters in log files and continuous integration web interfaces.
>
> Agreed.
>
> Best regards,
> Thomas
>
Thomas De Schampheleire Aug. 21, 2013, 3:27 a.m. UTC | #15
Op 21-aug.-2013 00:32 schreef "Arnout Vandecappelle" <arnout@mind.be> het
volgende:
>
> On 19/08/13 20:49, Thomas De Schampheleire wrote:
> [snip]
>
>>  >> However, while testing again, I noticed an annoyance: if the build
>>  >> process stops prematurely, for example because the build fails or the
>>  >> user interrupts it, the last tab title remains. I would much prefer
>>  >> that we can cleanly restore this no matter how buildroot/make stops.
>>  >
>>  >
>>  >  Won't that be the case regardless of whether the build fails or
succeeds?
>>
>> Currently it is indeed, but that could easily be fixed by adding an extra
>> such print at the end.
>
>
>  A print of what? An empty string? Then your window won't have a title
anymore... There is no way to save the previous window title, so I really
think that if PS1 doesn't set the window title, then buildroot shouldn't
either.

Other programs, like gentoo portage, are able to restore the window title
correctly. I don't know how, but it is possible.

That said, although I like the idea of easily seeing which package is
currently building, I also think it should either be perfect or not be at
all.

As an alternative, is it possible to count the number of make targets /
packages remaining, and show that in the MESSAGEs? Then you only have to
scroll up to the last message to get an idea...

Best regards,
Thomas
Thomas De Schampheleire March 15, 2014, 6:43 p.m. UTC | #16
Hi Francois,

On Wed, Aug 21, 2013 at 5:27 AM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
>
> Op 21-aug.-2013 00:32 schreef "Arnout Vandecappelle" <arnout@mind.be> het
> volgende:
>
>
>>
>> On 19/08/13 20:49, Thomas De Schampheleire wrote:
>> [snip]
>>
>>>  >> However, while testing again, I noticed an annoyance: if the build
>>>  >> process stops prematurely, for example because the build fails or the
>>>  >> user interrupts it, the last tab title remains. I would much prefer
>>>  >> that we can cleanly restore this no matter how buildroot/make stops.
>>>  >
>>>  >
>>>  >  Won't that be the case regardless of whether the build fails or
>>> succeeds?
>>>
>>> Currently it is indeed, but that could easily be fixed by adding an extra
>>> such print at the end.
>>
>>
>>  A print of what? An empty string? Then your window won't have a title
>> anymore... There is no way to save the previous window title, so I really
>> think that if PS1 doesn't set the window title, then buildroot shouldn't
>> either.
>
> Other programs, like gentoo portage, are able to restore the window title
> correctly. I don't know how, but it is possible.
>
> That said, although I like the idea of easily seeing which package is
> currently building, I also think it should either be perfect or not be at
> all.
>
> As an alternative, is it possible to count the number of make targets /
> packages remaining, and show that in the MESSAGEs? Then you only have to
> scroll up to the last message to get an idea...

Are you still interested in pursuing the principle of this patch? If
so, what about adapting the MESSAGEs instead, as suggested above. This
does not have the problem of not correctly restoring the window title
on abort...

Thanks,
Thomas
diff mbox

Patch

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 15db096..8572cb1 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -64,7 +64,8 @@  INFLATE.xz   = $(XZCAT)
 INFLATE.tar  = cat
 
 # MESSAGE Macro -- display a message in bold type
-MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
+MESSAGE     = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)" && \
+              echo -e "\033]2;$($(PKG)_NAME) $($(PKG)_VERSION) $(1)\007"
 TERM_BOLD  := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)