Sample Header Ad - 728x90

How can I launch a new session of tmux in iTerm2 on a separate window?

0 votes
2 answers
1760 views
I would like to start a tmux session on a separate window in iTerm2. Now I'm writing my own configuration script to launch the session. tmux new-session -s dev -n main -d tmux send-keys -t dev "cd $DL" C-m tmux split-window -h -t dev tmux split-window -v -t dev -p 30 tmux resize-pane -x 70 -y 20 tmux attach -t dev This starts a new session but the window is on the window I execute the script, not the new, separate window in iTerm2. So I changed the first line (tmux new-session -s dev -n main -d) to tmux -CC new -t dev, but then although the session starts in a new window, it does not have the split and the resize. It seems to only open the new session in a new window and that's all. How can I make it launched in a new window with all the initial settings including the directory change, split window, etc...?
Asked by Blaszard (369 rep)
Jul 4, 2018, 08:51 PM
Last activity: Jan 8, 2022, 02:52 AM