Hi,

I have been a Gentoo user for some time now, and one thing that I liked about their emerge/update process is that it put some information into the title bar of your build window, so you could tell at a glance which package was building, and how many more packages needed to be built.

I really missed this feature when doing T2 builds, so here is the first part of it:

If you are using an xterm, this patch will update the title bar with the package name that is currently being built. That is the first simple step. the next step would be to report the on the number of packages left to build. (TBD).

Jan
--- misc/output/terminal        (revision 32792)
+++ misc/output/terminal        (working copy)
@@ -80,6 +80,10 @@
 #
 echo_pkg_start_terminal() {
        date "+%n${term_color_header}== %T =[$1]=> Building $2/$3 [$4 $5].${term_color_normal}"
+       # if we are in an xterm, print the package name into the window title bar
+       if [ ${TERM} = xterm ]; then
+               echo -ne "\033]0;Building $2/$3 [$4 $5].\007"
+       fi
 }

 # We finished building a package.
@@ -90,6 +94,10 @@
 #
 echo_pkg_finish_terminal() {
        date "+${term_color_header}== %D %T =[$1]=> Finished building package $3.${term_color_normal}"
+       if [ ${TERM} = xterm ]; then
+               # Clear the window title
+               echo -ne "\033]0;\007"
+       fi
 }

 # We aborted building a package.
@@ -100,6 +108,10 @@
 #
 echo_pkg_abort_terminal() {
        date "+${term_color_error}== %D %T =[$1]=> Aborted building package $3.${term_color_normal}"
+       if [ ${TERM} = xterm ]; then
+               # Clear the window title
+               echo -ne "\033]0;\007"
+       fi
 }

 # Whenever the tail of error logs are printed, this function is used for

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2

Reply via email to