I want to setup my terminal such that whenever I start it, it starts tmux in split window.
I know I want to add this into my .tmux.config:
split-window -v -l 15
Now, I also want to start tmux from my .bash_profile, and I am not sure how.
I've read that it's recommended to use tmux new-session -A -s default that will attach or create to a new session.
If I do that then the .tmux.conf fails with 'no current session'. it want's me to start a new session in the tmux conf.
If I add new-session -A -s default to the conf, right before the split command, and then start tmux with tmux attach or rmux attach -t default or tmux new-session -A -s default then it loads, but with some error that it can't find some random .sesssion file, and the split is not exactly how I want it (actually not sure what happens in this case, it says 'restored session').
how exactly should I start tmux in this case?
.bash*files. i'd put an alias in.bash_aliasesor.bashrcand execute it manually just after login. (alias tmxa=' tmux new-session -A -s default'or whatever.) this will avoid problems with trying to attach to a session inside your session.