Marco, I do something similar in setting up new tmux sessions. There may be a more elegant way but I've not seen it.
To name the session you can do the following… > tmux new-session -s foo -d > tmux new-window -t foo -n "Editor" > tmux send-keys -t foo vim C-m > tmux new-window -t foo -n "Top" monitor htop Of course this leaves a default shell as the first window. In my case, I want a default shell in my session so I simply swap the last window with the first to get the order I want… > tmux swap-window -t foo:0 -Adrian "In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move." --Douglas Adams in The Hitchhiker's Guide to the Galaxy On May 25, 2013, at 6:13 AM, Marco <net...@lavabit.com> wrote: > Hi, > > I use shell functions to set up tmux sessions or attach to already > existing ones. What I basically do is the following: > > tmux new-session -s foo -d > tmux send-keys -t foo vim C-m > tmux new-window -t foo -n monitor htop > tmux attach -t foo > > I use send-keys instead of new-window because I don't want the > window to be closed after I quit vim, instead it want to be dropped > into a shell. I don't know if the send-keys approach is the right > thing to do, but it seems to work. Is there a better way to set up > this session? > > How do I set up the window name for the vim window? > > Marco > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! > http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users