Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catmux script #40

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,20 @@ session, use `tmux -L catmux list-sessions`. You can change the server's name by
in which `catmux_create_session` is started, will be used inside the catmux session (as long as no
other session previously exists on that particular tmux server).

To make things a bit easier, there is a convenience script installed with this
package: [`catmux`](script/catmux). It is basically a wrapper around `tmux -L
<server_name>`. For example, you can

``` bash
catmux attach # attach to the latest running catmux session
catmux ls # list current catmux sessions
catmux kill-session -t example_session # kill session 'target session'
```

In case you use another tmux server than `catmux`, you can set the environment
variable `CATMUX_DEFAULT_SERVER` to that name and continue using the `catmux`
script.

## Migrating from the catkin version of catmux
With the spread of ROS2, the need for a catkin-independent catmux has emerged.
Catmux is now a plain python package without the ROS integration.
Expand Down
9 changes: 9 additions & 0 deletions script/catmux
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# This script serves as an entry point to use the `catmux` command similar to
# the `tmux` command. Since catmux starts its sessions on its own server by
# default this script should provide a simple alternative to interact with
# catmux sessions easily.

TMUX_SERVER="${CATMUX_DEFAULT_SERVER:-catmux}"

tmux -L $TMUX_SERVER $@
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
entry_points={
"console_scripts": ["catmux_create_session=catmux.catmux_create_session:main"]
},
scripts=["script/catmux"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
Expand Down
Loading