How to open a tmux terminal with automatically separated to 6 windows?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:
But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.
terminal tmux
add a comment |Â
up vote
0
down vote
favorite
I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:
But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.
terminal tmux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:
But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.
terminal tmux
I can start tmux with simply issuing: "tmux", then by hand, separate the windows to 6:
But how could I automatically start tmux with "X" amount, ex.: 6 of separated windows? So I could work later on ex.: 6 different machines in parallel. Good stuff.
terminal tmux
asked Dec 25 '17 at 8:40
Peter
6112
6112
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
Try this:
tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;
Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.
add a comment |Â
up vote
0
down vote
The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.
Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with
tmuxinator start [project] -n [name]
Here's a sample yaml file so you get the idea of what it will look like:
- editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
panes:
- vim
- #empty, will just run plain bash
- top
There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux
session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.
With tmux-resurect I don't know offhand how to automate the restore so you can start tmux
with the layout already loaded (as opposed to starting and then restoring with Ctrl-R
). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.
EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try this:
tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;
Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.
add a comment |Â
up vote
0
down vote
accepted
Try this:
tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;
Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try this:
tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;
Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.
Try this:
tmux new-session ; split-window -h ; split-window -v -p 66 ; split-window -v ; select-pane -t 0 ; split-window -v -p 66 ; split-window -v ;
Also, consider looking at this question: https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened.
answered Dec 25 '17 at 10:14
Bhavin Chirag
1514
1514
add a comment |Â
add a comment |Â
up vote
0
down vote
The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.
Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with
tmuxinator start [project] -n [name]
Here's a sample yaml file so you get the idea of what it will look like:
- editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
panes:
- vim
- #empty, will just run plain bash
- top
There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux
session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.
With tmux-resurect I don't know offhand how to automate the restore so you can start tmux
with the layout already loaded (as opposed to starting and then restoring with Ctrl-R
). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.
EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux
add a comment |Â
up vote
0
down vote
The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.
Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with
tmuxinator start [project] -n [name]
Here's a sample yaml file so you get the idea of what it will look like:
- editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
panes:
- vim
- #empty, will just run plain bash
- top
There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux
session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.
With tmux-resurect I don't know offhand how to automate the restore so you can start tmux
with the layout already loaded (as opposed to starting and then restoring with Ctrl-R
). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.
EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.
Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with
tmuxinator start [project] -n [name]
Here's a sample yaml file so you get the idea of what it will look like:
- editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
panes:
- vim
- #empty, will just run plain bash
- top
There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux
session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.
With tmux-resurect I don't know offhand how to automate the restore so you can start tmux
with the layout already loaded (as opposed to starting and then restoring with Ctrl-R
). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.
EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux
The other answer is nice and simple. If you want anything more advanced (e.g. save state that includes window names, current directories and running commands and/or if you have more windows/more complicated layouts) there are a couple plugins available. Here's a quick summary.
Using the tmuxinator plugin, put your pane configuration in a yaml file as described by the documentation, then start with
tmuxinator start [project] -n [name]
Here's a sample yaml file so you get the idea of what it will look like:
- editor:
layout: b147,208x73,0,0[208x62,0,0,208x10,0,63104x10,0,63,103x10,105,63]
panes:
- vim
- #empty, will just run plain bash
- top
There's also the tmux-resurrect plugin (which I personally use). The nice thing is you can set up a tmux
session and then hit Ctrl+B (or whatever your prefix key is) followed by Ctrl+S and your layout will be saved to file. To restore Ctrl+B then Ctrl+R.
With tmux-resurect I don't know offhand how to automate the restore so you can start tmux
with the layout already loaded (as opposed to starting and then restoring with Ctrl-R
). I'm guessing it's possible but I'll leave it to you to figure out if you decide to use this plugin.
EDIT: The Continuum Plugin allows for an automated restore immediately after launching tmux
edited Jan 5 at 23:44
Communityâ¦
1
1
answered Dec 25 '17 at 10:07
B Layer
3,8991525
3,8991525
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412911%2fhow-to-open-a-tmux-terminal-with-automatically-separated-to-6-windows%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password