M
M
Maxim2015-12-28 15:53:56
linux
Maxim, 2015-12-28 15:53:56

How to run tmux with panels already split?

Hello!
Tell me, please, how to make it so that I can deploy tmux with ready-made panels written by me?
I do this:
there is a file~/tmux.services

run-shell '~/programs/phpProjects/dispatcherfake/'
run-shell './dispatcherfake'
splitw -h 
run-shell 'php -S 127.0.0.1:8004 -r ~/programs/phpProjects/targetproxymock/web'
splitw -v

dispatcherfake- executable file
Next, I run tmux, and in tmux Ctrl+b :source-file ~/tmux.services
52dcec69a3a448008345a5d1568bdf45.png
this is the result ... How can I get rid of these returned %code%and make it so that what I need starts in the panel?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Aitem, 2015-12-28
@ua6xh

Help https://github.com/tmuxinator/tmuxinator

O
okhsap, 2018-05-14
@okhsap

In case it's still relevant:
You can write this in the ~/.tmux.conf file.
Below is just an example with three panels:

new -s SESSION-NAME -n WINDOW_NAME ping 127.0.0.1  #Новая сессия с именем SESSION-NAME
                                                                                              #и окном WINDOW_NAME, которая запускает 
                                                                                              #пинг локалхоста.
split-window -h -t 0 nano                                                      #Предыдущая панель делится на 2 части 
                                                                                               #и в ней запускается nano        
split-window -v -t 0 bash                                                       #Самая первая панель делится еще на две части
                                                                                               #и в ней запускается bash

D
Dmitry, 2020-06-03
@Gladspir

And you can tell him what size of panels to create: if not 2, but more?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question