Skip to content

Commit

Permalink
Documentation clarification for loading tmux project files, doc fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Aug 5, 2014
1 parent 29a7014 commit 75db05b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,19 @@ JSON
.. literalinclude:: ../.tmuxp.json
:language: json

Run script before launch
------------------------
Bootstrap project before launch
-------------------------------

You can use ``before_script`` to run a script before the tmux session
starts building.
starts building. This can be used to start a script to create a virtualenv
or download a virtualenv/rbenv/package.json's dependency files before
tmuxp even begins building the session.

It works by using the `Exit Status`_ code returned by a script. Your
script can be any type, including bash, python, ruby, etc.

A successful script will exit with a status of ``0``.

You can use this for things like bootstrapping ruby / python environments
for a project (or checking to verify their installation).

Important: the script file must be chmod executable ``+x`` or ``755``.

Run a python script (and check for it's return code), the script is
Expand Down Expand Up @@ -297,14 +296,18 @@ and panes omitted in this example)
.. _Exit Status: http://tldp.org/LDP/abs/html/exit-status.html

Project configs
---------------
Per-project tmux config
-----------------------

You can load your software project in tmux by placing a ``.tmuxp.yaml`` or
``.tmuxp.json`` in the project's config and loading it.

tmuxp supports loading configs via absolute filename with ``tmuxp load``
and via ``$ tmuxp load .`` if config is in directory.

To make a per-project config, use ``.tmuxp.yaml`` and ``.tmuxp.json`` in
the root of your project directory.
.. bash::

$ tmuxp load ~/workspaces/myproject.yaml

See examples of ``tmuxp`` in the wild. Have a project config to show off?
Edit this page.
Expand Down
2 changes: 1 addition & 1 deletion doc/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ What is a {pane,window}_index vs a {pane,window,session}_id?

Pane index refers to the order of a pane on the screen.

Window index refers to the # of the pane in the session.
Window index refers to the # of the window in the session.

To assert pane, window and session data, tmuxp will use
:meth:`Server.list_sessions()`, :meth:`Session.list_windows()`,
Expand Down

0 comments on commit 75db05b

Please sign in to comment.