@@ -15,23 +15,24 @@ You create YAML config files that detail what windows and panes should be create
15
15
16
16
### example.yml
17
17
``` yaml
18
- name : example
19
18
dir : ~/project
20
- windows :
21
-
22
- # Start a database
23
- - name : database
24
- panes :
25
- - cmd : service postgresql start
26
- readycheck :
27
- test : pg_isready -h localhost -p 5432 -U postgres
28
- interval : 3s
29
- retries : 3
30
-
31
- # Run a program that must start after the database is ready
32
- - panes :
33
- - cmd : ./myprogram
34
- depends_on : ["database"]
19
+ sessions :
20
+ - name : example
21
+ windows :
22
+
23
+ # Start a database
24
+ - name : database
25
+ panes :
26
+ - cmd : service postgresql start
27
+ readycheck :
28
+ test : pg_isready -h localhost -p 5432 -U postgres
29
+ interval : 3s
30
+ retries : 3
31
+
32
+ # Run a program that must start after the database is ready
33
+ - panes :
34
+ - cmd : ./myprogram
35
+ depends_on : ["database"]
35
36
` ` `
36
37
37
38
Bring up a tmux session:
@@ -46,7 +47,7 @@ tmux-compose -f example.yml down
46
47
47
48
### Installation
48
49
49
- tmux-compose was built with Go. If you already have Go setup, you can just :
50
+ tmux-compose was built with Go. If you already have Go setup, you ` go get ` the utility :
50
51
51
52
``` bash
52
53
go get github.com/kevinms/tmux-compose.git
@@ -60,55 +61,77 @@ cd tmux-compose
60
61
go install
61
62
```
62
63
63
- Go code can easily compile for other OSes, but I have only tested running it in Linux.
64
+ Go code can easily compile for other OSes, but this has only been tested on Linux.
64
65
65
66
### Project
66
67
Example showing all options for the root node of the config file
67
68
``` yaml
68
- name : example
69
69
dir : /path/to/project
70
70
up_pre_cmd : (date; echo start) > run.log
71
71
up_post_cmd : (date; echo done) >> run.log
72
72
down_pre_cmd : touch example.tmp
73
73
down_post_cmd : rm example.tmp
74
- windows :
75
- - name : code
76
- panes :
77
- - cmd : vim
78
- - panes :
79
- - cmd : top
74
+ sessions :
75
+ - name : example
76
+ windows :
77
+ - name : code
78
+ panes :
79
+ - cmd : vim
80
+ - panes :
81
+ - cmd : top
80
82
` ` `
81
83
82
- ### Windows
84
+ ### Sessions
83
85
Example showing all options being used for a window:
84
86
` ` ` yaml
85
- name : example
86
- windows :
87
- - name : My Window
87
+ sessions :
88
+ - name : example
88
89
dir : ~/project
89
- focus : true
90
- layout : main-vertical
90
+ readycheck :
91
+ test : ping -c1 domain.net
92
+ interval : 3s
93
+ retries : 10
91
94
depends_on : ["thing1", "thing2"]
92
- panes :
93
- - cmd : vim
94
- - cmd : sleep 5
95
+ windows :
96
+ - name : code
97
+ panes :
98
+ - cmd : vim
99
+ - panes :
100
+ - cmd : top
101
+ ` ` `
102
+
103
+ ### Windows
104
+ Example showing all options being used for a window:
105
+ ` ` ` yaml
106
+ sessions :
107
+ - name : example
108
+ windows :
109
+ - name : My Window
110
+ dir : ~/project
111
+ focus : true
112
+ layout : main-vertical
113
+ depends_on : ["thing1", "thing2"]
114
+ panes :
115
+ - cmd : vim
116
+ - cmd : sleep 5
95
117
` ` `
96
118
97
119
### Panes
98
120
Example showing all options being used for a pane:
99
121
` ` ` yaml
100
- name : example
101
- windows :
102
- - panes :
103
- - name : My Pane
104
- dir : ~/project
105
- cmd : python -m SimpleHTTPServer 8000
106
- focus : true
107
- readycheck :
108
- test : ping -c1 domain.net
109
- interval : 3s
110
- retries : 10
111
- depends_on : ["thing1", "thing2"]
122
+ sessions :
123
+ - name : example
124
+ windows :
125
+ - panes :
126
+ - name : My Pane
127
+ dir : ~/project
128
+ cmd : python -m SimpleHTTPServer 8000
129
+ focus : true
130
+ readycheck :
131
+ test : ping -c1 domain.net
132
+ interval : 3s
133
+ retries : 10
134
+ depends_on : ["thing1", "thing2"]
112
135
` ` `
113
136
114
137
#### Directly Inspired By:
0 commit comments