You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smug/README.md

67 lines
1.5 KiB
Markdown

4 years ago
# Smug - tmux session manager.
Inspired by [tmuxinator](https://github.com/tmuxinator/tmuxinator) and [tmuxp](https://github.com/tmux-python/tmuxp)
## Usage
4 years ago
`tmux <command> <project>[:window name] [-w window name]`.
4 years ago
## Examples
To start/stop a project and all windows, run:
`$ smug start project`
`$ smug stop project`
4 years ago
When you already have a running session, and you want to create only some windows from the configuration file, you can do something like this:
4 years ago
`$ smug start project:window1`
`$ smug start project:window1,window2`
`$ smug start project -w window1`
`$ smug start project -w window1 -w window2`
## Configuration
4 years ago
Configuration files are stored in the `~/.config/smug` directory in the `YAML` format, e.g `~/.config/smug/your_project.yml`.
4 years ago
Example:
```yaml
session: blog
root: ~/Developer/blog
before_start:
- docker-compose -f my-microservices/docker-compose.yml up -d # my-microservices/docker-compose.yml is a relative to `root`
stop:
- docker stop $(docker ps -q)
windows:
- name: code
root: blog # a relative path to root
manual: true # you can start this window only manually, using the -w arg
commands:
- docker-compose start
panes:
- type: horizontal
root: .
commands:
- docker-compose exec php /bin/sh
- clear
- name: infrastructure
root: ~/Developer/blog/my-microservices
panes:
- type: horizontal
root: .
commands:
- docker-compose up -d
- docker-compose exec php /bin/sh
- clear
```