Skip to content

Commit bd94ff6

Browse files
committed
updated README, ready for announcing?
1 parent 84d2799 commit bd94ff6

File tree

2 files changed

+81
-8
lines changed

2 files changed

+81
-8
lines changed

README.md

+79-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,88 @@
11
# Catmux
22

3-
## DISCLAIMER - IN HEAVY DEVELOPMENT
4-
This package is currently in early development phase. It's interface might completely change and/or
3+
## About
4+
Catmux is a little helper to run a tmux session with multiple windows and panes with just one
5+
command. It is inspired and functionally very similar to
6+
[tmuxinator](https://github.com/tmuxinator/tmuxinator), but without the project management feature
7+
which is in my opinion kind of an overhead.
8+
9+
Session configs can be stored anywhere and have to given as an argument.
10+
11+
## DISCLAIMER - Early package
12+
This package is currently in development phase. It's interface might completely change and/or
513
functionality might be moved around or even removed without notice. Use it at your own risks and
614
report issues and problems :)
715

16+
However, by now it has been used productively in four different projects by different people without
17+
problems, so I would consider it 'working'.
818

9-
## About
10-
Catmux is a little helper to run a tmux session with multiple windows and panes with just one
11-
command. It is inspired and functionally very similar to [tmuxinator](https://github.com/tmuxinator/tmuxinator), but without the project management feature which is in my opinion kind of an overhead.
19+
If you try out catmux and you find anything you're missing, anything that doesn't work as expected,
20+
or is clearly a bug, please create an issue here, I'll be happy to answer to them. Of course, merge
21+
requests are always welcome, as well :)
1222

13-
Session configs can be stored anywhere and have to given as an argument.
23+
## Motivation
24+
In most of our ROS projects at work we use shell output for almost all nodes to get log information
25+
during runtime. Having all this in one window where you start your "Start it all"-launchfile makes
26+
it very hard to follow the log of a specific node. Starting everything in separate windows is quite
27+
a lot of work and requires documentation overhead in sense of documenting which launchfiles or nodes
28+
have to be started.
29+
30+
At a conference I caught the idea to use tmux scripting to orchestrate all this in one tmux session.
31+
However, quickly I noticed that creating these scripts is a daunting task as you'll have to type in
32+
a lot of commands over and over again and as soon as you wanted to do things a little different such
33+
as not starting a particular launchfile if a certain parameter was set, things got complicated.
34+
35+
I liked the yaml-syntax of [tmuxinator](https://github.com/tmuxinator/tmuxinator), but that tool
36+
didn't quite hit the spot. I wanted to have something that can be easily integrated into a ROS
37+
project and I definitely wanted something that saves the config per project and not all configs at
38+
one central spot on a particular machine.
39+
40+
## Installation
41+
As catmux is designed as a catkin package, simply clone it into your catkin-workspace, build it and
42+
you're done.
43+
44+
## Usage
45+
Currently, there is no full-blown documentation, but the example config file in
46+
`etc/example_session.yaml` gives a detailed insight on possible commands.
47+
48+
### Running the example the most simple way
49+
to simply run the example, type
50+
```
51+
rosrun catmux create_session package://catmux/etc/example_session.yaml
52+
```
53+
54+
To see further options, simply run it with argument `-h`:
55+
```
56+
$ rosrun catmux create_session -h
57+
usage: create_session [-h] [-n SESSION_NAME] [-t TMUX_CONFIG] [-d]
58+
[--overwrite OVERWRITE]
59+
session_config
60+
61+
Create a new catmux session
62+
63+
positional arguments:
64+
session_config Session configuration. Should be a yaml-file.
65+
66+
optional arguments:
67+
-h, --help show this help message and exit
68+
-n SESSION_NAME, --session_name SESSION_NAME
69+
Name used for the tmux session
70+
-t TMUX_CONFIG, --tmux_config TMUX_CONFIG
71+
This config will be used for the tmux session
72+
-d, --detach Start session in detached mode
73+
--overwrite OVERWRITE
74+
Overwrite a parameter from the session config.
75+
Parameters can be specified using a comma-separated
76+
list such as '--overwrite param_a=1,param_b=2'.
77+
```
1478

79+
### Full blown example
80+
To make use of all catmux features, run the following example command:
81+
```
82+
rosrun catmux create_session package://catmux/etc/example_session.yaml --tmux_config package://catmux/etc/tmux_default.conf --session_name example_session --overwrite show_layouts=True,replacement_param="new catmux user"
83+
```
1584

85+
### Killing a catmux session
86+
If you are not that familiar with tmux: To kill a session, simply type `tmux kill-session` in any
87+
terminal window. In the `etc/tmux_default.conf` there is a key-binding for that, see
88+
`etc/readme_tmux.txt` for details.

etc/example_session.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ windows:
2525
layout: tiled # One can use the default layouts specified by tmux
2626
splits:
2727
- commands:
28-
- echo "hello"
29-
- echo "world"
28+
- echo "catmux with multiple commands"
29+
- echo "hello ${replacement_param}"
3030
- commands:
3131
- echo "1"
3232
- commands:

0 commit comments

Comments
 (0)