Git Product home page Git Product logo

tmuxinator's Introduction

Tmuxinator

Gem Version Integration Tests Coverage Status Code Climate Dependency Status Gitter

Create and manage tmux sessions easily.

Screenshot

Installation

RubyGems

gem install tmuxinator

Homebrew

brew install tmuxinator

Some users have reported issues when installing via Homebrew, so the RubyGems installation is preferred until these are resolved.

tmuxinator aims to be compatible with the currently maintained versions of Ruby.

Some operating systems may provide an unsupported version of Ruby as their "system ruby". In these cases, users should use RVM or rbenv to install a supported Ruby version and use that version's gem binary to install tmuxinator.

Editor and Shell

tmuxinator uses your shell's default editor for opening files. If you're not sure what that is type:

echo $EDITOR

For me that produces "vim". If you want to change your default editor simply put a line in ~/.bashrc that changes it. Mine looks like this:

export EDITOR='vim'

tmux

The recommended version of tmux to use is 1.8 or later, with the exception of 2.5, which is not supported (see issue 536 for details). Your mileage may vary for earlier versions. Refer to the FAQ for any odd behaviour.

Completion

Your distribution's package manager may install the completion files in the appropriate location for the completion to load automatically on startup. But, if you installed tmuxinator via Ruby's gem, you'll need to run the following commands to put the completion files where they'll be loaded by your shell.

bash

# wget https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.bash -O /etc/bash_completion.d/tmuxinator.bash

zsh

# wget https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.zsh -O /usr/local/share/zsh/site-functions/_tmuxinator

Note: ZSH's completion files can be put in other locations in your $fpath. Please refer to the manual for more details.

fish

$ wget https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.fish -O ~/.config/fish/completions/tmuxinator.fish

Usage

A working knowledge of tmux is assumed. You should understand what windows and panes are in tmux. If not please consult the man pages for tmux.

Create a project

Create or edit your projects with:

tmuxinator new [project]

Create or edit a local project where the config file will be stored in the current working directory (in .tmuxinator.yml) instead of the default project configuration file location (e.g. ~/.config/tmuxinator):

tmuxinator new --local [project]

For editing you can also use tmuxinator open [project]. new is aliased to n,open to o, and edit to e. Please note that dots can't be used in project names as tmux uses them internally to delimit between windows and panes. Your default editor ($EDITOR) is used to open the file. If this is a new project you will see this default config:

# ~/.tmuxinator/sample.yml

name: sample
root: ~/

# Optional tmux socket
# socket_name: foo

# Note that the pre and post options have been deprecated and will be replaced by
# project hooks.

# Project hooks

# Runs on project start, always
# on_project_start: command

# Run on project start, the first time
# on_project_first_start: command

# Run on project start, after the first time
# on_project_restart: command

# Run on project exit ( detaching from tmux session )
# on_project_exit: command

# Run on project stop
# on_project_stop: command

# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions.
# pre_window: rbenv shell 2.0.0-p247

# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf

# Change the command to call tmux. This can be used by derivatives/wrappers like byobu.
# tmux_command: byobu

# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used.
# startup_window: editor

# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used.
# startup_pane: 1

# Controls whether the tmux session should be attached to automatically. Defaults to true.
# attach: false

# Enables the display of pane titles. For example "editor" below. Defaults to false.
# enable_pane_titles: true

# Configures pane title position. Can be: bottom, top, or "off". Note: "off" must be provided in quotes to avoid being interpreted as a boolean false. Defaults to top.
# pane_title_position: bottom

# Configures pane title format. Defaults to "#{pane_index}: #{pane_title}".
# Please see the tmux manpage for details, on valid formats.
# pane_title_format: " [ #T ] "

windows:
  - editor:
      layout: main-vertical
      # Synchronize all panes of this window, can be enabled before or after the pane commands run.
      # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after'
      # synchronize: after
      panes:
        - editor:
          - vim
        - guard
  - server: bundle exec rails s
  - logs: tail -f log/development.log

Windows

The windows option allows the specification of any number of tmux windows. Each window is denoted by a YAML array entry, followed by a name* and command to be run.

*Users may optionally provide a null YAML value (e.g. null or ~) in place of a named window key, which will cause the window to use its default name (usually the name of their shell).

windows:
  - editor: vim

Window specific root

An optional root option can be specified per window:

name: test
root: ~/projects/company

windows:
  - small_project:
      root: ~/projects/company/small_project
      panes:
        - start this
        - start that

This takes precedence over the main root option.

Panes

Note that if you wish to use panes, make sure that you do not have . in your project name. tmux uses . to delimit between window and pane indices, and tmuxinator uses the project name in combination with these indices to target the correct pane or window.

Panes are optional and are children of window entries, but unlike windows, they do not need a name. In the following example, the editor window has 2 panes, one running vim, the other guard.

windows:
  - editor:
      layout: main-vertical
      panes:
        - vim
        - guard

The layout setting gets handed down to tmux directly, so you can choose from one of the five standard layouts or specify your own.

Please note the indentation here is deliberate. YAML's indentation rules can be confusing, so if your config isn't working as expected, please check the indentation. For a more detailed explanation of why YAML behaves this way, see this Stack Overflow question.

Note: If you're noticing inconsistencies when using a custom layout it may be due #651. See this comment for a workaround.

Pane titles

It is also possible (starting with tmux v2.6) to give a title to panes.

enable_pane_titles: true

windows:
  - editor:
      layout: main-vertical
      panes:
        - editor:
          - vim
        - guard

Interpreter Managers & Environment Variables

To use tmuxinator with rbenv, RVM, NVM etc, use the pre_window option.

pre_window: rbenv shell 2.0.0-p247

These command(s) will run before any subsequent commands in all panes and windows.

Custom session attachment

You can set tmuxinator to skip auto-attaching to the session by using the attach option.

attach: false

If you want to attach to tmux in a non-standard way (e.g. for a program that makes use of tmux control mode like iTerm2), you can run arbitrary commands by using a project hook:

on_project_exit: tmux -CC attach

Passing directly to send-keys

tmuxinator passes commands directly to send keys. This differs from simply chaining commands together using && or ;, in that tmux will directly send the commands to a shell as if you typed them in. This allows commands to be executed on a remote server over SSH for example.

To support this both the window and pane options can take an array as an argument:

name: sample
root: ~/

windows:
  - stats:
    - ssh [email protected]
    - tail -f /var/log/stats.log
  - logs:
      layout: main-vertical
      panes:
        - logs:
          - ssh [email protected]
          - cd /var/logs
          - tail -f development.log

ERB

Project files support ERB for reusability across environments. Eg:

root: <%= ENV["MY_CUSTOM_DIR"] %>

You can also pass arguments to your projects, and access them with ERB. Simple arguments are available in an array named @args.

Eg:

$ tmuxinator start project foo
# ~/.tmuxinator/project.yml

name: project
root: ~/<%= @args[0] %>

...

You can also pass key-value pairs using the format key=value. These will be available in a hash named @settings.

Eg:

$ tmuxinator start project workspace=~/workspace/todo
# ~/.tmuxinator/project.yml

name: project
root: ~/<%= @settings["workspace"] %>

...

Starting a session

This will fire up tmux with all the tabs and panes you configured, start is aliased to s.

tmuxinator start [project] -n [name] -p [project-config]

If you use the optional [name] argument, it will start a new tmux session with the custom name provided. This is to enable reuse of a project without tmux session name collision.

If there is a ./.tmuxinator.yml file in the current working directory but not a named project file in ~/.tmuxinator, tmuxinator will use the local file. This is primarily intended to be used for sharing tmux configurations in complex development environments.

You can provide tmuxinator with a project config file using the optional [project-config] argument (e.g. --project-config=path/to/my-project.yaml or -p path/to/my-project.yaml). This option will override a [project] name (if provided) and a local tmuxinator file (if present).

Shorthand

The shell completion files also include a shorthand alias for tmuxinator that can be used in place of the full name*.

mux [command]

*The mux alias has been removed from the Zsh completion script because it was resulting in unexpected behavior in some setups. Including aliases in completion scripts is not standard practice and the Bash and Fish aliases may be removed in a future release. Going forward, users should create their own aliases in their shell's RC file (e.g. alias mux=tmuxinator).

Other Commands

Copy an existing project. Aliased to c and cp

tmuxinator copy [existing] [new]

List all the projects you have configured. Aliased to l and ls

tmuxinator list

Remove a project. Aliased to rm

tmuxinator delete [project]

Remove all tmuxinator configs, aliases and scripts. Aliased to i

tmuxinator implode

Examines your environment and identifies problems with your configuration

tmuxinator doctor

Shows tmuxinator's help. Aliased to h

tmuxinator help

Shows the shell commands that get executed for a project

tmuxinator debug [project]

Shows tmuxinator's version.

tmuxinator version

Project Configuration Location

Using environment variables, it's possible to define which directory tmuxinator will use when creating or searching for project config files. (See PR #511.)

Tmuxinator will attempt to use the following locations (in this order) when creating or searching for existing project configuration files:

  • $TMUXINATOR_CONFIG
  • $XDG_CONFIG_HOME/tmuxinator
  • ~/.tmuxinator

FAQ

Window names are not displaying properly?

Add export DISABLE_AUTO_TITLE=true to your .zshrc or .bashrc

Commands being lost or corrupted

If a lot of commands or long commands are sent to a pane, and commands or characters seem to be lost or corrupted, it could be that the TTY typeahead buffer is full and losing new characters. This may happen when an earlier command takes a long time to complete. This seems to affect macOS with zsh more than other platforms.

When this occurs, try putting your commands in a separate script and calling that from your tmuxinator configuration using e.g.: source.

Contributing

To contribute, please read the contributing guide.

Copyright

Copyright (c) 2010-2020 Allen Bargi, Christopher Chow. See LICENSE for further details.

tmuxinator's People

Contributors

adamstrickland avatar akofink avatar augustelalande avatar aziz avatar christophersjchow avatar dannluciano avatar doitian avatar drapergeek avatar endorama avatar ethagnawl avatar geggo98 avatar haletom avatar hedgehog avatar j3rn avatar jneen avatar kenbolton avatar kerams avatar latortuga avatar marcosinger avatar nathankot avatar p-becker avatar pczarn avatar podung avatar rglassett avatar richard-walton avatar rominf avatar rpassis avatar seanmalloy avatar spiegela avatar thedeeno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tmuxinator's Issues

Enable use with wemux

I prefer to use wemux rather than tmux for remote pairing purposes, I was wondering if it would be possible to set an option in the config for a project to have it use wemux rather than tmux.

Thanks,
Andrew

Complex layouts don't seem to work

e.g.

tabs:
  - shell:
      layout: a506,379x84,0,0{125x84,0,0[125x26,0,0,4,125x31,0,27,83,125x25,0,59,82],125x84,126,0[125x42,126,0,79,125x41,126,43,86],127x84,252,0[127x27,252,0,80,127x30,252,28,84,127x25,252,59,85]}
      panes:
        - echo 1
        - echo 2
        - echo 3
        - echo 4
        - echo 5
        - echo 6
        - echo 7
        - echo 8

Only creates 5 panes

Would like to not have tabs have names.

I prefer all my tabs being automatic-rename but because of how tmuxinator starts tabs it gives them a name which makes it so I can't just see what is running there or when a process is done.

if a tab doesn't have a key or value it should open bash with no name, like panes.
if a tab has a key but no value it should use the key as the value and execute it.
if a tab has a key and a value it should do as tmuxinator has always done.

What are the layout options?

In the example code you have layout: main-vertical for the editor tab, but I can't find any mention of what other options are available for the layout setting. Is it documented anywhere?

Tmuxinator doesn't work when the project name contains a dot

If the project_name contains a dot like project.js and I start the project with $ mux project.js then Tmuxinator will start a plain tmux session, ignoring all the Tmuxinator settings.

I guess this isn't maintained anymore, but I'll just report this, in case anybody is wondering why Tmuxinator silently fails.

Configurable tmuxinator

In issue #41 I mentioned progressing tmuxinator towards easily allowing power configurations - essentially as a step toward having snippets/aliases that abstract those details. To do this we need to expose tmux's option setting. If issue #41 is pulled in here is what the next step might look like (note the use of syntax consistent with tmux, i.e. - in place of _ giving consistency in the tmux option names and tmuxinator option names - yes this would require a 0.x release :)

layout keys and notifications would all be common/convenient/best-practice config snippets that are distirbuted with tmuxinator and inserted as called, e.g. keys: emacs, these of course could be global as well as tab specific.

# ~/.tmuxinator/<%= @name %>.yml
# you can make as many tabs as you wish...

project-name: Tmuxinator
project-root: ~/code/rails_project
socket-name: foo    # Not needed.  Remove to use default socket
rbenv: "1.9.2-p290"
bundler: on         # optional bundler rbenv-plugin
pre: sudo /etc/rc.d/mysqld start
server-options:
  - opt-name-1: value 1 # See
  - opt-name-2: val2
session-options:
  - opt-name-1: value 1
  - opt-name-2: val2
window-options:
  - opt-name-1: value 1
  - opt-name-2: val2
environment:
  - ENV_VAR_A: value1
tabs:
  - editor:
      environment:
        - ENV_VAR_A: value2
        - ENV_VAR_B: value1
      window-options:
        - opt-name-1: value 1
        - opt-name-2: val2
      session-options:
        - opt-name-1: value 1
        - opt-name-2: val2
      layout: main-vertical
      panes:
        - vim
        - #empty, will just run plain bash
        - top
  - shell: git pull
      layout: tmuxinator_display_name
      keys: tmuxinator_binding_name
      notifications: tmuxinator_notice_name
  - database: rails db
  - server: rails s
  - logs: tail -f logs/development.log
  - console: rails c
  - capistrano:
  - server: ssh me@myhost

thoughts?

Project Root Not working

Currently, tmuxinator takes a project root setting.

This setting is used at the top of the tmuxinator script to cd into the root prior to starting the tmux server. Using tmux 1.4 on OSX with ZSH, this does not work. The tmux server still starts up in the user's root directory.

This can be solved by using
set default-path $PROJECT_ROOT

Pull request to come.

Problems using tmuxinator with vim-powerline

He

I have some troubles using the vim-powerline together with the tmuxinator. If I start a session with
tmuxinator where vim gets started automatically the powerline does not display all text and symbols as well as there are some colors missing. If I start a tmux session manually and start Vim in it everything is fine.

Best Claas

Add "new" to help output.

Am I wrong or is this command missing from the help text?

The #1 users of "help" are the first-time users, so I think it's important to include.

-rking

ParserSyntaxError in tmuxinator_completion when installing gem

Successfully installed tmuxinator-0.5.0
1 gem installed
Installing ri documentation for tmuxinator-0.5.0...
Building YARD (yri) index for tmuxinator-0.5.0...
[error]: ParserSyntaxError: syntax error in `bin/tmuxinator_completion`:(5,6): syntax error, unexpected $undefined
[error]: Stack trace:
        /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb:505:in `on_parse_error'
    /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb:49:in `parse'
    /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb:49:in `parse'
    /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/ruby/ruby_parser.rb:15:in `parse'
    /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:438:in `parse'
    /home/jakub/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.4/lib/yard/parser/source_parser.rb:361:in `parse_in_order'

 Installing RDoc documentation for tmuxinator-0.5.0...

When installing tmuxinator. I am using ruby 1.9.2-p290, rubygems 1.8.10 and rvm 1.8.1. This might be related to #44 but I am not sure if really is.

spelling error in output from doctor

$ tmuxinator doctor
  cheking if tmux is installed ==> Yes
  cheking if $EDITOR is set ==> Yes
  cheking if $SHELL is set ==> Yes

  make sure you have this line in your ~/.bashrc file:

  [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

checking is spelled as "cheking"

it hurt my eyes :-)

Having trouble getting this working...

Here is my yml:

# ~/.tmuxinator/foo.yml
# you can make as many tabs as you wish...

project_name: Foo
project_root: /projects/foo
rvm: ree
tabs:
  - main:
      layout: main-vertical
      panes:
        -
        -
        -
        -
  - log: tail -f log/development.log

This is the output I get in my terminal (once I exit my mangled tmux session):

failed to connect to server: Connection refused
set option: base-index -> 1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1
window not found: Foo:1

Any thoughts?

Common pre-panes command

heirachy of shared pre-panes command

tabs:
  - editor: 
      pre: echo 'I get run in each pane.  Before each pane command!'
      layout: main-vertical
      panes: 
        - vim
        - #empty, will just run plain bash
        - top
  - shell: git pull
  - guard:
      layout: tiled
      pre:
        - echo 'I get run in each pane.'
        - echo 'Before each pane command!'
      panes:
        -
        - #empty, will just run plain bash
        -

Possibility to define which pane will be active.

When defining the layout for your windows, it would be awesome to be able to specify which pane should be active.
For instance I like to have one big pane to work on a server and a smaller pane underneath it to display logs. However, when I create my two panes, the bottom one (created last) always has the focus.
It would be awesome to be able to have a simple way (extra argument in pane definition for example) to specify wich pane should be active. It is possible that this feature already exists, but I have not found it :)

junk shown with split panes after upgrade to tmux 1.5

Downloaded the latest version of tmux from http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz

./configure --prefix=$HOME
make
make install

my .tmux.conf file is empty.

installed the latest using:

git clone https://github.com/aziz/tmuxinator.git

and using this minimal yml-file:

# ~/.tmuxinator/error.yml
# you can make as many tabs as you wish...

project_name: error
project_root: ~/
tabs:
  - editor:
      layout: even-vertical
      panes:
        - #empty
        - #empty, will just run plain bash
        - #empty

This causes the horisontal splits to be rendered as

â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â��â�

Same behavior in gnome-terminal as well as xterm.
Running Ubuntu 10.04

$TERM=xterm-256color

No problem creating windows/panes using tmux alone. Previously today I used an older version of tmux (the one in ubuntu repository, think it was 1.1-1) and everything worked,that version was installed in /usr/bin. Upgraded to 1.5 and installed it locally since I'm not root here at work and it doesn't work any longer.

Probably some ncurses mismatch or similar...

$ ldd ~/bin/tmux
    linux-vdso.so.1 =>  (0x00007fff4f1a0000)
    libutil.so.1 => /lib/libutil.so.1 (0x00007f4a2161c000)
    libm.so.6 => /lib/libm.so.6 (0x00007f4a21399000)
    libncurses.so.5 => /lib/libncurses.so.5 (0x00007f4a21155000)
    libevent-1.4.so.2 => /usr/lib/libevent-1.4.so.2 (0x00007f4a20f3b000)
    librt.so.1 => /lib/librt.so.1 (0x00007f4a20d33000)
    libc.so.6 => /lib/libc.so.6 (0x00007f4a209af000)
    libresolv.so.2 => /lib/libresolv.so.2 (0x00007f4a20796000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f4a20592000)
    libnsl.so.1 => /lib/libnsl.so.1 (0x00007f4a20377000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4a2015a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f4a21845000)

Any ideas?

Will do the same from home this evening and see if I get same behavior.
I'll update when I have tried

first tab commands don't run properly

I think there might be an issue with the window 1 setup. My yml file settings are properly executed for all tabs but the first one. The first window opens but none of the commands appear to execute. In the terminal that I am launching my tmuxinator project from I see messages like

mrmargolis$ start_mrm
session not found: mrm
set option: base-index -> 1
window not found: mrm:1
window not found: mrm:1

I am running tmuxinator 0.1.6 and installed tmux on snow leopard using homebrew. Any ideas?

deleted space in yml-file causes failure

deleted a space by mistake in my .yml file

tabs:
  -editor:

instead of

tabs:
  - editor:

This results in:

$ tmuxinator open svp
/home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/config_writer.rb:55:in `process_config!': undefined method `keys' for ["-editor", [{"work"=>nil}]]:Array (NoMethodError)
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/config_writer.rb:53:in `each'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/config_writer.rb:53:in `process_config!'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/config_writer.rb:19:in `file_path='
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/config_writer.rb:13:in `initialize'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:132:in `new'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:132:in `update_scripts'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:131:in `each'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:131:in `update_scripts'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:59:in `open'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:13:in `send'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/../lib/tmuxinator/cli.rb:13:in `start'
        from /home/XXXXXXX/.gem/ruby/1.8/gems/tmuxinator-0.3.4/bin/tmuxinator:6
        from /home/XXXXXXX/.gem/ruby/1.8/bin/tmuxinator:19:in `load'
        from /home/XXXXXXX/.gem/ruby/1.8/bin/tmuxinator:19

Took me 1 hour to track down, on the verge of throwing everything out and install it from scratch ;-)

A better looking error-message would be nice, or update doctor to do a syntax check of the yml-file

The fault can be seen in

method `keys' for ["-editor", [{"work"=>nil}]]:Array (NoMethodError)

but that isn't evident, at least not for me...

support default shell setting

Default shell in some distros in 'unexpected', e.g. dash in Ubuntu. This can lead to some ambiguity about what profile/rc scripts are loaded. This such a patch would allow people to set their default shell. Pull request forthcoming....

Permission denied on Ubuntu 12.04

When creating a new project with tmuxinator open test_project then I get the error sh: 1: /home/kai/.tmuxinator/test_project.yml: Permission denied. My editor never shows up. Using Ruby 1.9.3 on Ubuntu 12.04.

I also wonder what the line [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator is for? There is no .tmuxinator/scripts folder. Does it get generated when using tmuxinator open? In my case it doesn't.

export to .conf?

I learned about tmuxinator from Brian P. Hogan's book. One thing he mentioned is that tmuxinator is not something you'd necessarily set up on every environment you use tmux because of its dependence on ruby.

This made me think of a possible feature that may already exist (sorry, still new to tmuxinator). Is there / could there be a way to export a tmuxinator configuration to a normal .tmux.conf configuration file. This would allow you to create your config files on one machine (that has ruby) and use the config on another.

Thanks for the interesting project, looking forward to trying it out!

user friendly message when starting a non-existant project

Hey,

It'd be great to print a user friendly error message when starting a non-existant project. As it stands, mux prints:

$ mux start asdf
(erb):7:in render': undefined method[]' for nil:NilClass (NoMethodError)
from /Users/mperpick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/erb.rb:753:in eval' from /Users/mperpick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/erb.rb:753:inresult'
from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/gems/tmuxinator-0.5.0/lib/tmuxinator/config_writer.rb:24:in render' from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/gems/tmuxinator-0.5.0/lib/tmuxinator/cli.rb:143:instart'
from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/gems/tmuxinator-0.5.0/lib/tmuxinator/cli.rb:13:in run' from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/gems/tmuxinator-0.5.0/bin/mux:6:in<top (required)>'
from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/bin/mux:19:in load' from /Users/mperpick/.rvm/gems/ruby-1.9.2-p290@timber/bin/mux:19:in

'

Otherwise, very cool tool.

Matt

create pane failed: pane too small

Is there any way to avoid the error message "create pane failed: pane too small" when starting tmuxinator?

To group servers together I'd like to have 8-9 panes open in the same window, and I really don't care if the panes get a bit small on a 24" monitor with 1920x1200 (I mainly use main-vertical or main-horizontal as layout anyways)

Failed to install

cody@zentop:~$ ls ~/.tmuxinator
ls: cannot access /home/cody/.tmuxinator: No such file or directory

Everything else installs correctly.

 export PATH="$PATH:/var/lib/gems/1.8/gems/tmuxinator-0.5.0/bin"
 cody@zentop:~$ mux doctor
 checking if tmux is installed ==> Yes
 checking if $EDITOR is set ==> Yes
 checking if $SHELL is set ==> Yes

tmuxinator simply isn't working.... please fix.

Initialize shell environment upon startup (bash) [featurerequest]

I have different task that requires that some environmental variables are set and that $PATH contains certain folders.
One solution is to update my .bashrc direct with all env-variables and add all folder to my path but this clutters my environment.

A different approach (better) could be that tmuxinator supported setting env-variables as a pre-step.
Tried using the "pre:" tag but it seems like you only can run a binary from there.

What I'd like to be able to do is something similar to this:

pre: export WORKING_DIR=~/proj/tmp && export SVP_REMOTE_TOOLS=$WORKING_DIR/svp_remote_tools

meaning that these variables will be available for all windows/panes for this specific tmux-session.

This would make it possible to have a complete environment specified in a yml-file.

Perhaps there exist a way already but I haven't figured it out yet; in that case I'm sorry.

problems with changing the bash's C-j keybinding

When I change the default C-j keybinding on .inputrc, tmuxinator fails to spawn my sessions because it seems to send C-j to enter its commands. This is the behavior I like for bash:

Control-j: menu-complete
Control-k: menu-complete-backward

tmuxinator socket location

I know you can specify tmux -S to start a certain socket for other users to connect to. Is there a way to determine where the socket is for a tmuxinator project when it's opened? Would be a bonus if you could somehow display the socket in the tmux status-left or status-right.

generate fallback ttmux.sh for dev experiments, + fallback launch option

In order to easily launch a tmux session on startup we need to write tmuxinator launch script to a file, in the root_dir.

This should allow one to launch a tmux session on startup, and any changes you make via tmuxinator will be written out, ready for next login, when you test launch your changes. Neat.

Clarified the use case in the title.

start_[project_name] does not work

tmuxinator is running like a charm and helping me a lot.

But the shell command start_[project_name] is not working so I have to use mux [project_name] instead. It doesn't hurt but is not that cool.

I checked and the folder ~/.tmuxinator/scripts/* doesn't exists, anyone know what problem i might be having?

Fail to install

Hi again,

Thinks are not working out for me...

 ~/src/tmuxinator
$ git pull
Already up-to-date.

$ gem install tmuxinator
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /var/lib/gems/1.8 directory.

$ sudo gem install tmuxinator
[sudo] password for XXXXXXX: 

  __________________________________________________________
 \ ..........................................................

  Thank you for installing tmuxinator
  Please be sure to to drop a line in your ~/.bashrc file, similar 
  to RVM if you've used that before:

  [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

  also ensure that you've set these variables in your ENV:

  $EDITOR, $SHELL

  you can run `tmuxinator doctor` to make sure everything is set.
  happy tmuxing with tmuxinator!

  ..........................................................
 \ __________________________________________________________


Successfully installed tmuxinator-0.4.0
1 gem installed
Installing ri documentation for tmuxinator-0.4.0...
Installing RDoc documentation for tmuxinator-0.4.0...

$ grep tmux ~/.bashrc
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

$ echo $TERM
xterm-256color
$ echo $SHELL
/bin/bash
$ echo $EDITOR
vim

Now try to run it:

$ tmuxinator
tmuxinator: command not found

$ sudo find . -type f -name tmuxinator
./var/lib/gems/1.8/bin/tmuxinator
./var/lib/gems/1.8/gems/tmuxinator-0.4.0/bin/tmuxinator

$ cd .tmuxinator
-bash: cd: .tmuxinator: No such file or directory

What just happened?

I'm a python guy, don't know enough to debug ruby...

Am I being stupid or is tmuxinator broken?

tmuxinator update_scripts?

I'm currently using the latest version and it seems like the update_scripts command is now gone. How do i update the scripts for it to have start_<project> on my zsh

Colorscheme and config

Hi,

it's not a direct issue concerning tmuxinator but
is the colorscheme and the tmux-config
from the screenshot available?

thanks
tom

tmuxinator doctor, spelling error

  $ tmuxinator doctor
  cheking if tmux is installed ==> Yes
  cheking if $EDITOR is set ==> Yes
  cheking if $SHELL is set ==> Yes

  make sure you have this line in your ~/.bashrc file:

  [[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && source $HOME/.tmuxinator/scripts/tmuxinator

checking is spelled as "cheking"

default project_root to current working directory

It would be nice to be able to set a tmuxinator configuration that will dynamically set the project_root dynamically to the working directory.

Whatever stack you develop on, you probably have a very similar setup for each project that you work on regardless of the directory. I.e. if I'm a Rails dev I'm pretty much always have a window/pane for Vim, one for Rails's console, another for test output, and another general shell. None of these actions to open these change across working directories.

E.g.

Given I have a tmuxinator configuration called rails that will set the project_root upon invoking to pwd
And I'm in ~/dev/proj1
And I invoke my tmuxinator "project" configuration tmuxinator rails
Then the project_root will be pwd and vim, rails console, whatever other tabs I have will open from the current working directory

Gemspec is incorrect

Executing gem build tmuxinator.gemspec causes the following error:

ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    ["TODO"] are not files

You can include the TODO file or remove it from the gemspec to correct.

Use aliased tmux command?

Would it be possible to use the aliased version of the tmux command if one is present?

I have issues with 256 colors in vim inside tmux and the only way I've been able to solve it is by aliasing as follows:

alias tmux="TERM=screen-256color-bce tmux"

attr error in ConfigWriter class

Hi, after a gem install tmuxinator I run tmuxinator and I got
/Library/Ruby/Gems/1.8/gems/tmuxinator-0.2.0/bin/../lib/tmuxinator/config_writer.rb:4:in `attr': wrong number of arguments (6 for 2) (ArgumentError)

A local problem?

10.6.0 Darwin
ruby 1.8.7

Exit tmuxinator project session

It'd be neat to have a feature which allows you to exit a tmuxinator project session safely i.e.
for a pane running vim, it first does a :qa, followed by a to close the pane,
for a pane running a server, it does a followed by

The exact commands could be specified in the project yaml file.

Comments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.