Terminal xterm Title is too dynamic (title doesn't change manually)
So when I upgraded to Slack64 13.1 on my asus MB homebrewed desktop and Slack 13.1 on my compaq presario a900 laptop, I started having issues with the xterm title (in Terminal--not Konsole) being too dynamic. By "too dynamic" I mean that I can't actually change the title. The dynamic title (from my .bashrc) is basically just pwd. Whenever I try to set the title (via terminal->set title (menu)), I changes it for a split second, and then reverts back to the dynamic title.
This is merely a petty annoyance, so to get around it, I added an xtitle function that I grabed somewhere online (just echos "\033]0;$*\007"). So for nano-ing some file, I'd type:
xtitle some_file.txt; nano some_file.txt
That works just fine (kind of annoying to type though). running xtitle alone won't actually change the name either though (I'm pretty sure it's the same command as what terminal does anyway). That is, running:
changes the title for a split second, and the reverts back to my old pwd.
What I really want is to have it dynamically name it "some_file.txt" whenever I use nano, but that appears to be a functionality of zsh (with the preexec() fxn).
I'm wondering if anyone else has had this problem, and if you have a fix for it.
My bashrc is a modified version (just slimmed down--mostly aliases removed) of this example one: http://tldp.org/LDP/abs/html/sample-bashrc.html. Mine is commented out like crazy, so I don't think you really want to read it.
You could define a function in .bashrc that effectively does xtitle some_file.txt; nano some_file.txt for you. Something like (not tested)
Awesome! That is an awesome idea! Here's what I did in full:
added the nano function (just like above, I added the usual case for xterm, though...despite the fact that I only use xterm...but whatever) to my bashrc as "nano_title()"
Poof! Everything I've ever wanted and more! Thank you so much!
Glad it worked for you :-)
The Thread Tools menu can be used to mark threads as SOLVED.
I keep coming back to this everytime I setup a new machine. There are some fancier ways of doing this out there, but since I use nano for just about all of my editing purposes, I tend to have several tabs of nano open, so this is particularly useful for that.
An update for the times:
makes sure that the line is:
Also, check out this thread, too for a beefier way of doing this:
|All times are GMT -5. The time now is 05:51 AM.|