Skip to content

Commit

Permalink
change: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
corrupt952 committed Sep 3, 2024
1 parent 1301d58 commit 3023262
Showing 1 changed file with 39 additions and 30 deletions.
69 changes: 39 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,78 @@

[![Test](https://github.com/corrupt952/tmuxist/actions/workflows/test.yaml/badge.svg)](https://github.com/corrupt952/tmuxist/actions/workflows/test.yaml)

## TODO
### main
* log level
### test
* config
* logger
`tmuxist` is a tool to manage tmux sessions with configuration file.
You can define tmux session in `tmuxist.toml` and start or attach tmux session with `tmuxist` command.

## Installation

### Manual

Download tar.gz on [Latest release](https://github.com/corrupt952/tmuxist/releases/latest).

### Homebrew

```sh
brew tap corrupt952/tmuxist
brew install tmuxist
```

## Commands
### tmuxist init
Initialize configuration.

```sh
tmuxist init
# or, with profile name
tmuxist init -profile your_profile
```
### tmuxist init

### tmuxist edit
Edit configuration.
Initialize configuration.
When you run this command, `tmuxist.toml` is created in the current directory.

```sh
tmuxist edit
# or, with profile name
tmuxist edit -profile your_profile
# or, specify editor
tmuxist edit -profile gvim
tmuxist init
```

### tmuxist start
Start tmux session.

Start or attach tmux session.
When you run this command, the session defined in `tmuxist.toml` is created or attached.

```sh
tmuxist start
# or, with profile name
tmuxist start -profile your_profile
```

### tmuxist output
Ouput tmuxist configuration.
### tmuxist kill

Kill tmux session.
When you run this command, the session defined in `tmuxist.toml` is deleted.

```sh
tmuxist output
# or, with profile name
tmuxist output -profile your_profile
tmuxist kill
```

## Architecture

`tmuxist` reads `tmuxist.toml` in the directory where the command is executed and manages tmux sessions.

### Configuration

`tmuxist.toml` is a configuration file written in TOML format.

In the example of `tmuxist.toml` below, the following tmux session is created.

## Configuration
- Session name ... `tmuxist`
- Window 1
- Pane 1 ... `htop` command is executed in root(current directory)
- Window 2
- Pane 1 ... `cd ~/Repo/corrupt952/tmuxist` command is executed and move to the directory
- Pane 2 ... Empty pane
- Window 3
- Layout ... `tiled`
- Synchronize panes ... `true`
- Pane 1 ... Empty pane
- Pane 2 ... Empty pane
- Pane 3 ... Empty pane
- Pane 4 ... Empty pane

```toml
name = 'tmuxist'
root = '~'
root = '.'
attach = true

[[windows]]
Expand Down

0 comments on commit 3023262

Please sign in to comment.