Terminal.app Tab Namer v0.1 Alpha

This is a SIMBL plugin for Terminal.app on Leopard that lets you name your tabs. Because this is an Alpha, I am not going to write up instructions on where to get SIMBL, how to install it, or how to install the bundle. If you don’t already know how, then Alpha software is not for you.

That said, after installing the plugin, press Command+Shift+T to name a tab (or use the Name Tab option under the View menu).

NOTE: This has only been tested on Intel Macs with the latest version of SIMBL. If you have a PowerPC and it works for you, I’d love to hear about it in the comments.

Also, due to the nature of me giving this away for free, I cannot guarantee it won’t harm your computer, nor can I promise it will fix your marriage. This is for use AT YOUR OWN RISK. I wash my hands completely of responsibility.

Enjoy!

Terminal Tab Namer v0.1 ALPHA

  • JS
    If you had just said go to http://www.culater.net/software/SIMBL/SIMBL.php, install SIMBL and copy bundle to SIMBL plugin directory it would have saved me 15 minutes, but thanks alot, the plugin is awesome!
  • Ralph
    I used this for about an year, then it suddenly stopped working this week. Any ideas as to what might have caused it? The only major system change I had lately was the latest system update for Leopard (10.5.8), which upgraded iTunes and Safari, I think.
  • With snow leopard you can just do Cmd-Shift-I, enter tab name and press Esc. So TabNamer would be redundant.
  • adamsalter
    It's true that you don't _have_ to use this on Snow Leopard, but this plugin was easier to use than the Terminal info pane... I would really prefer to use this if it still worked on SL in 64bit mode.
    (btw SIMBL has been updated for SL as well...)
  • Any chance of getting this running on Snow Leopard? As soon as I launch Terminal, I get a popup saying:
    "Error

    Terminal 2.1 (v272) has not been tested with the plugin TabNamer (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer for further information."

    Great plugin, though - thanks!
  • Thanks for this! Works fantastic! I love the apple terminal, so this saved me from having to use another app!!!!
  • Adam Salter
    This doesn't work on Snow Leopard due to version check (you also have to open the Terminal.app in 32-bit mode, but apparently SIMBL doesn't work in 64-bit at all).
  • Sorry for the double post, but are these the two relevant pieces:

    First which of these do I use?
    setCustomTitle: or setScriptCustomTitle:

    Second, is passing this necessary?
    setScriptTitleDisplaysCustomTitle (passing it true I assume)
  • Hey Eric,

    I realize we all get busy and probably forgot about posting the source, but maybe if you just posted the method you are swizzling to make this work that would be enough to get me going.

    Thanks!

    -Jeremy
  • Amilcar Silvestre
    The plugin is great! Thanks. But I miss a way to set windows title to tab title automatically (and keeping the option to set the name using Command+Shift+T).

    Will you release the source code so that the community contribute the suggestions in this post to the code?
  • Any chance you would be willing to release the source code to this plugin?
  • I'll definitely consider it since I haven't bothered to update it in awhile.
  • I'm not really sure which this is a limitation of. I'm sorry I couldn't be of more help.
  • Eduardo Rocha
    I can't use the bundle if the language (at System Preferences > International) is not English. Is this a SIMBL limitation or a bundle limitation?

    Thank you.
  • sergio
    You made my day!!

    I'm so happy to have found this one. You should have a donate button on this post.
  • thanks so much for this! All I wanted was to be able to rename tabs when I've got like 16 SSH tabs open and now I can!
  • Antonin Hildebrand
    Thank you Eric for this util.

    Nuzz: i've also used rb-appscript for terminal.app automation. this works for me:

    tab.title_displays_custom_title.set(true)
    tab.custom_title.set('some title')

    custom title will show up also as tab title, when this bundle is installed
  • My changes work just like the standard changes when the shell spawns a new child, so unless your hack breaks those, I don't anticipate interference. It does seem like a lot of folks are looking for your hack to be more transparent to the xterm escape sequence. I've not used that, and I understand it enables a more dynamic window name than my hack, but that it doesn't work on tabs?

    I was proposing that if you can readily expose some sort of interface, such as a command line utility which sets the tab name for the corresponding virtual terminal, I could use your hack for the name setting portion of my hack. As it stands my hack also changes how processes appear in ps, for example, though it is robust across Terminal versions, and could conceivably be used on any platform that needed it.

    As I see it, there are two classes of problems we're trying to solve:
    1) An interface for setting tab names from within the corresponding shell and via the GUI. It sounds like you've got a subset of this problem solved, and could solve the whole thing fairly readily from your current codebase.

    2) More complex logic for setting tab names (and other settings) when specific programs are invoked. This depends on #1, but my hacked solution contains name setting components which only work for this subset of problems. It's useless for updates that don't correspond to command execution.

    For anyone who didn't notice that my name is linked to the website for my project, here's the URL: http://purpleamy.com/magicwrap/
  • I should probably update the tab namer to take notice of outside changes to the window title. This would make it work better with your hack.
  • I've just published a different partial solution for those of you who are looking to have tab names reflect SSH (or ftp, telnet, etc) targets. A sourceforge repository is available (the code is written in Perl), as well as an installer package for 10.3-10.5. I'd also consider hooks to make use of the SIMBL plugin, if it can be easily detected and exposes some kind of interface which I use to push tab name changes instead of my current method of dynamic hardlink generation.
  • Scott Stonefield
    ok well now using it for a few hours, it does break the way I was setting the title bar. I used the Xterm escape sequence to set the title bar to the name of the machine and current working directory. Now that is not be set unless I resize the terminal window :(

    I understand this is still alpha and I will still be using it. And I will just wait for updates :)

    -S
  • Scott Stonefield
    This is great! Only thing that would be better if I could programatically change it when I log into a new host. But it works! Thanks for coding this.

    -S
  • Tobia Conforto
    Great plugin! Thank you

    I'm seconding the request for programmatically setting the tab title, and/or an option to use the "window title" as the default tab name (instead of using the "process name" as it does by default) and/or the source so that we can add this feature ourselves!
  • Doug Anderson
    ...damn, the backslashes didn't work at all in that last post. It's supposed to be this, with a backslash instead of _backslash_...

    echo -ne "_backslash_033]0;MyTitle_backslash_007"
  • Doug Anderson
    Great little plugin! Any way to make it automatically grab the title that is set like this?

    echo -ne "33]0;MyTitle07"

    ...doing an echo like that actually sets the title that's shown when you do a "Set Title" from the Shell menu and would be super handy for programmatically setting the title...

    I'd be happy to take a look at it if you want to drop me the source code...
  • Nathan
    Thanks a ton, Eric. It is so nice to be able to use Terminal the way that I need to.
  • Hakan
    Works beautifully. Thanks!
  • nuzz
    This is a great little util! I was wondering if the text for the tab could be programatically supplied. I've been messing around with rb-appscript and this SIMBL plugin. Having both working together would make my day :) Any thoughts?

    http://onrails.org/articles/2007/11/28/scriptin...
  • Thanks! Worked perfectly!
  • Adam Jacob Muller
    Fantastic! I can finally ditch iTerm!
    Source Please :)!
  • Jnolla
    Fantastic! Thank you so much! This was the most annoying thing ever; I had to go back to iTerm because of this problem.

    Not anymore! Thanks
  • dunolie
    not working on ppc ... posted a pic on my picassa site. (http://picasaweb.google.com/dunolie/RobbiePubli...)

    longing for a nice intel mac hardware upgrade for myself :)

    dunolie
  • Jeroen
    It seems to work on a PowerPC. Even together with Ciarán Walsh's Terminal Tab Switching plugin.

    However, I have a zsh precmd to update the window title, and it doesn't play very nice with this bundle. Sometimes it updates the tabtitle, sometimes it doesn't. What's worse: this plugin also stops the updating the original windowtitle.
  • Nice work, Eric.

    Plugin does exactly what it's supposed to. BTW, enabling the rename on mouse double-click could be a good idea (I used this with Konsole - was quite nice).

    Thanks!
  • It's on my list of Todos. Just added it to Things.
blog comments powered by Disqus