muxt

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 10 Imported by: 0

README

muxt

CI Status

A commandline tool for setting up tmux environments.

Installation

If you use homebrew, installation is as simple as:

brew tap dweinand/utilities
brew install muxt

Otherwise you can download a binary for the latest release.

Usage

Muxt uses TOML-based config files for defining your tmux sessions.

If your config file is placed in ~/.muxt, you can start the session by simply passing the base name of the file to the muxt command.

muxt [name]

Otherwise, you can specify an arbitrary path to a config file to use.

muxt path/to/config.toml

Configuration

Muxt's configuration is based on TOML v.0.4.0. See an example for more infromation.

Development

Muxt uses gb and you should install it before building or running tests.

To run tests:

make test

To build:

make build

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dweinand/muxt.

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Acknowledgments

Muxt is inspired by similar tools:

License

Muxt is available as open source under the terms of the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDir = filepath.Join(os.Getenv("HOME"), ".muxt")

ConfigDir is the location where muxt will look for config files

Functions

This section is empty.

Types

type Pane

type Pane struct {
	Name     string
	Commands []string
}

Pane is a pane configuration

type Session

type Session struct {
	Name      string
	Root      string
	Window    []Window
	Pre       string
	PreWindow string
	// contains filtered or unexported fields
}

Session is a session configuration

func Load

func Load(name string) (*Session, error)

Load looks for a toml config file and then parses it into a Session

func NewSession

func NewSession() *Session

NewSession creates a new empty Session

func Parse

func Parse(buf []byte) (*Session, error)

Parse converts toml data into a Session

func (*Session) Script

func (s *Session) Script() (string, error)

Script returns the generated shell commands without executing them

func (*Session) Start

func (s *Session) Start(sh shell.Execer) error

Start launches tmux and loads the Session

type Window

type Window struct {
	Name     string
	Root     string
	Layout   string
	Commands []string
	Pane     []Pane
}

Window is a window configuration

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL