Skip to content

joshddunn/mux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mux

mux is a command line tool to manage tmux sessions.

Install

brew install joshddunn/tap/mux

Commands

command description
config Open config file (~/.mux.json) with $EDITOR
start <session> Start session in config file
stop <session> Stop session in config file

Config

The config file for mux is ~/.mux.json

key required default values description
sessions yes [] <Session Config> Array of Session configs

Session Config

key required default values description
name yes <string>
dir yes <directory>
zeroIndex no false <boolean>
selectWindow no 1 <number>
windows no [] <Window Config> Array of Window configs

Window Config

key required default values description
name yes <string>
dir no <Session directory> <directory>
layout no default default, columns, rows
splitPercent no 35 <number> Only relevant if using the default layout
panes no [] <Pane Config> Array of Pane configs

Pane Config

key required default values description
dir no <Window directory> <directory>
command no <string>
execute no true <boolean> Only relevant if command is defined

Example Config

{
  "sessions": [
    {
      "name": "dev",
      "dir": "~/code",
      "zeroIndex": true,
      "selectWindow": 1,
      "windows": [
        {
          "name": "nvim editor",
          "panes": [{ "command": "nvim", "execute": false }]
        },
        {
          "name": "code",
          "panes": [{}, {}, {}]
        }
      ]
    }
  ]
}

Config Validation

If you use neovim, coc, and the coc-json plugin, add the following to the coc-settings.json file to validate the config file.

"json.schemas": [
    {
      "url": "https://raw.githubusercontent.com/joshddunn/mux/refs/heads/main/embed/config.schema.json",
      "fileMatch": [".mux.json"]
    }
]

About

Manage tmux sessions

Resources

Stars

Watchers

Forks

Packages

No packages published