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
.
env: # session name
dir: ~/Desktop # session directory
zeroIndex: <true|false> # window numbering starts at 0 when true or 1 when 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
jmux start <session>
will start and attach to a specific session.
jmux start all
will start all sessions and attach to the first session defined in the configuration file.
jmux stop <session>
will stop a specific session.
jmux stop all
will stop all sessions defined in the configuration file.