View previous topic :: View next topic |
Author |
Message |
joycea Apprentice
Joined: 23 Jul 2002 Posts: 191 Location: Kingston, Canada
|
Posted: Sun Mar 23, 2003 1:30 am Post subject: Terminal Titles |
|
|
As I was updating my system today, I got to wondering where in the update process portage was. I found myself trying to dissect the filenames as they flew past to determine what package it was. I was thinking that it shouldn't be too hard to add an option to Portage to have it set the title of the terminal to something like "Portage - Building smbfs-1.2.1 [12/24]"
My question is: does anyone think this is an idea worth submitting to bugzilla? I started wading through the Portage code as I felt that it shouldn't be too hard to add this myself. Seeing as I have never programmed in Python before though, this ended up being harder than I initially thought. Maybe if there is enough positive response I'll spend the time to figure it out and post a patch or something.
As a followup, can anyone think of reasons why changing the window titles might be a bad/awful idea? |
|
Back to top |
|
|
Strubenator n00b
Joined: 17 Mar 2003 Posts: 19 Location: Frederick, MD
|
Posted: Sun Mar 23, 2003 2:58 am Post subject: |
|
|
It sounds like an excellent idea to me!
I've never programmed python either...but we all have to learn sometime.
--Strube |
|
Back to top |
|
|
CountZero Tux's lil' helper
Joined: 21 Jan 2003 Posts: 79 Location: Arlington, TX, USA
|
Posted: Sun Mar 23, 2003 6:53 am Post subject: |
|
|
I would have to approve of the idea. It wouldn't be extra bloat or anything like that. It's just a matter of setting an environment variable and then unsetting it when the process is done. Unfortunately, I've never programmed in Python either (gonna learn somday) so I can't be much help. There's no harm in submitting it to Bugzilla. |
|
Back to top |
|
|
dma Guru
Joined: 31 Jan 2003 Posts: 437 Location: Charlotte, NC, USA
|
Posted: Sun Mar 23, 2003 7:41 am Post subject: |
|
|
Here's the escape sequence (there are also escape sequences for minimize window, etc):
http://www.tldp.org/HOWTO/mini/Xterm-Title-3.html
Code: |
if not "--pretend" in myopts:
print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[2],"to",x[1]
emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[2]+" to "+x[1])
if x[0]=="ebuild":
|
If you want to hack yours, go for it. |
|
Back to top |
|
|
jagerman Tux's lil' helper
Joined: 27 Jun 2002 Posts: 104 Location: Vancouver, BC, Canada
|
Posted: Mon Mar 24, 2003 4:03 am Post subject: Re: Terminal Titles |
|
|
joycea wrote: | As a followup, can anyone think of reasons why changing the window titles might be a bad/awful idea? |
If you are on the console (you know, Ctrl-Alt-1 through 6), you'll see a few ugly control characters and the title, because it doesn't recognize the xterm title control characters.
To get around it, you can do it nicely by getting the term info, and only displaying it if the terminal supports it, or as a hack by only showing it if $TERM = "xterm" or "xterm-color". |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Mar 24, 2003 5:31 am Post subject: |
|
|
I have heard rumors that this (or something quite similar) may appear as soon as 2.0.47-r11. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
jagerman Tux's lil' helper
Joined: 27 Jun 2002 Posts: 104 Location: Vancouver, BC, Canada
|
|
Back to top |
|
|
|