jimeh/tmuxifier — pull request #24 by PaBLoX-CL (2013-11-03 21:05:05+00:00)
Title: Allow renaming windows from within the layout files

Ok, there it is... it's not very clean actually but it does its job.

If you use prezto or another shell framework with some sort of automatic rename of the Tmux title, it normally gets renamed from `preexec` or `precmd`, which means the title will keep renaming itself, even after you choose a name from `new_window`. Since the name of the window has to be renamed after everything, the only way I found was to run a subshell and call sleep from there.

Most times you could need this if if you are checking a log (`tail -f` for ie) and you are not likely to use that pane/window again. Running local servers, using guard or tools that are going to be run once could benefit from a renaming after they have been started.

I couldn't find a way to check if the function was being called from a `layout.session.sh` or `layout.window.sh`, so I had to create two different functions from each, but I'm pretty sure something could be done to improve this, please don't hesitate to comment on how I can improve it.

Well... I hope my explanation was clear =/