Repository navigation
Expand file tree
/
Copy pathconfig.yml
More file actions
114 lines (102 loc) · 2.7 KB
/
Copy pathconfig.yml
File metadata and controls
114 lines (102 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# yaml-language-server: $schema=https://raw.githubusercontent.com/bthall/mox/main/schema/mox.schema.json
# mox configuration example.
#
# Default location: $XDG_CONFIG_HOME/mox/config.yml (or ~/.config/...)
#
# Quoting note: any value containing a colon followed by a space must be
# quoted (e.g. 'echo "host: x"'), or YAML will parse it as a mapping.
# Optional: reusable layouts.
layouts:
two-pane:
panes:
- split: root
commands:
- "# main pane"
- split: vertical
size: 30
commands:
- "# side pane (30%)"
three-pane-dev:
panes:
- split: root
commands:
- "# editor"
- split: horizontal
size: 30
commands:
- "# build/test output"
- split: vertical
size: 50
commands:
- "# logs"
# Session definitions.
sessions:
# Simple mode: one window, one pane per host. Each pane runs the connect
# template (default `ssh {{host}}`).
simple:
hosts: [api, web, worker]
root: ~/projects/myapp
commands:
- 'echo "host: $(hostname)"'
# Custom connect command — e.g. mosh on a non-default port.
prod:
connect: "mosh --port 60000 ops@{{host}}"
hosts: [bastion1, bastion2]
# Window-level hosts: each window has its own host group.
devenv:
root: ~/projects/myapp
windows:
- name: backend
hosts: [api1, api2, api3]
commands:
- cd ~/projects/myapp/api
- 'echo "backend: $(hostname)"'
- name: frontend
hosts: [web1, web2]
commands:
- cd ~/projects/myapp/web
- npm run dev
- name: workers
hosts: [worker1, worker2, worker3]
commands:
- cd ~/projects/myapp/workers
- 'echo "worker: $(hostname)"'
# Complex mode: explicit pane layouts.
monitoring:
root: ~/
windows:
- name: system
panes:
- split: root
commands:
- htop
- split: horizontal
size: 30
commands:
- watch -n 1 df -h
- split: vertical
size: 50
commands:
- watch -n 1 free -h
- name: logs
layout: two-pane
# Mix simple and complex windows in the same session.
fullstack:
root: ~/projects/app
windows:
- name: services
hosts: [api, cache, db]
- name: dev
panes:
- split: root
commands:
- nvim
- split: horizontal
size: 20
commands:
- npm run test:watch
- split: vertical
size: 50
commands:
- git status
- git log --oneline -10