# @joshddunn/jmux

> Automate building new tmux sessions.

Latest version **0.7.0** (published 2024-11-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install @joshddunn/jmux
pnpm add @joshddunn/jmux
yarn add @joshddunn/jmux
bun add @joshddunn/jmux
```

Provides the command `jmux`.

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2024-11-09 |
| First published | 2022-07-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=18.0.0 <19.0.0 |
| Dependencies | 3 |
| Unpacked size | 63.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Josh Dunn |
| Maintainers | joshddunn |

## Links

- npm: https://www.npmjs.com/package/@joshddunn/jmux
- Repository: https://github.com/joshddunn/jmux
- Homepage: https://github.com/joshddunn/jmux#readme
- Issues: https://github.com/joshddunn/jmux/issues
- npm.io page: https://npm.io/package/@joshddunn/jmux

## Dependencies (3)

- [joi](https://npm.io/package/joi.md) ^17.13.1
- [yaml](https://npm.io/package/yaml.md) ^2.1.1
- [commander](https://npm.io/package/commander.md) ^9.4.0

## Recent versions

- 0.7.0 (latest) — 2024-11-09
- 0.6.1 — 2024-10-29
- 0.6.0 — 2024-10-29
- 0.5.2 — 2024-05-29
- 0.5.0 — 2024-05-19
- 0.4.1 — 2022-07-29
- 0.4.0 — 2022-07-29
- 0.3.1 — 2022-07-22
- 0.3.0 — 2022-07-22
- 0.2.0 — 2022-07-21
- 0.1.1 — 2022-07-21
- 0.1.0 — 2022-07-21

## README

# jmux

`jmux` is a command line tool that automates building tmux sessions.

## Installation

`npm install -g @joshddunn/jmux`

## Configuration

By default, `jmux` will try to load the configuration defined in `~/.jmux.yaml`. Alternatively, you can use a file in a different location using the `-f` flag.

Multiple session configurations can exist within `~/.jmux.yaml`. Below is a guide for configuring `jmux`.

```yaml
env: # session name
  dir: ~/Desktop # session directory
  zeroIndex: <true|false> # window numbering starts at 0 when true or 1 when false -- default false
  selectWindow: 1 # open specific window on start
  windows:
    - name: desktop # window name
      dir: ~/Desktop # optional directory -- if undefined, the session directory is used
      layout: <default|rows|columns> # optional layout -- if undefined, the default layout is used
      splitPercent: 35 # optional default layout sidebar size -- if undefined, 35 is used
      panes:
        - dir: ~/Desktop # optional directory -- if undefined, the window directory is used
          command: nvim # command that will be executed (nvim will be open)
        - dir: ~/Desktop
          placeholder: nvim # command that will not be executed (nvim won't be open)
```

## Usage

See `jmux help` for available commands and usage.

Add the following to your zshrc file to automatically evaluate the command with `mux`

```
mux() {
  eval $(jmux $@ -e)
}
```

## Layouts

### Default

![Screen Shot 2022-07-20 at 2 22 07 AM](https://user-images.githubusercontent.com/7513070/179911297-b6754c16-0825-414c-94b2-facd207ae1ca.png)

### Rows

![Screen Shot 2022-07-20 at 2 22 21 AM](https://user-images.githubusercontent.com/7513070/179911303-8b191ba4-de6d-473f-bc94-0a585d5d1148.png)

### Columns

![Screen Shot 2022-07-20 at 2 22 31 AM](https://user-images.githubusercontent.com/7513070/179911314-28eb8ba7-ab9c-4053-88ef-3804048316e5.png)

## Resources

[tmux manual](https://man7.org/linux/man-pages/man1/tmux.1.html)

---
_Source: https://npm.io/package/@joshddunn/jmux · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
